@angular/core 21.2.0 → 22.0.0-next.0

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 (76) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +613 -523
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +1 -1
  5. package/fesm2022/_not_found-chunk.mjs +1 -1
  6. package/fesm2022/{_effect-chunk2.mjs → _pending_tasks-chunk.mjs} +31 -31
  7. package/fesm2022/_pending_tasks-chunk.mjs.map +1 -0
  8. package/fesm2022/_resource-chunk.mjs +92 -30
  9. package/fesm2022/_resource-chunk.mjs.map +1 -1
  10. package/fesm2022/_untracked-chunk.mjs +1 -1
  11. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  12. package/fesm2022/core.mjs +5 -5
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/primitives-di.mjs +1 -1
  15. package/fesm2022/primitives-event-dispatch.mjs +1 -1
  16. package/fesm2022/primitives-signals.mjs +1 -1
  17. package/fesm2022/rxjs-interop.mjs +2 -2
  18. package/fesm2022/testing.mjs +14 -2
  19. package/fesm2022/testing.mjs.map +1 -1
  20. package/package.json +3 -3
  21. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  22. package/schematics/bundles/change-detection-eager.cjs +155 -0
  23. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  24. package/schematics/bundles/common-to-standalone-migration.cjs +4 -4
  25. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  26. package/schematics/bundles/control-flow-migration.cjs +1 -1
  27. package/schematics/bundles/http-xhr-backend.cjs +118 -0
  28. package/schematics/bundles/{imports-CVmcbVA9.cjs → imports-CKV-ITqD.cjs} +4 -3
  29. package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
  30. package/schematics/bundles/inject-migration.cjs +3 -3
  31. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  32. package/schematics/bundles/migrate_ts_type_references-MWoZx-Cb.cjs +1 -1
  33. package/schematics/bundles/{ng_component_template-BOuKAnQd.cjs → ng_component_template-DPAF1aEA.cjs} +2 -2
  34. package/schematics/bundles/{ng_decorators-DYy6II6x.cjs → ng_decorators-IVztR9rk.cjs} +2 -2
  35. package/schematics/bundles/ngclass-to-class-migration.cjs +4 -4
  36. package/schematics/bundles/ngstyle-to-style-migration.cjs +4 -4
  37. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  38. package/schematics/bundles/output-migration.cjs +1 -1
  39. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  40. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  41. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  42. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  43. package/schematics/bundles/route-lazy-loading.cjs +4 -16
  44. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  45. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  46. package/schematics/bundles/signal-input-migration.cjs +1 -1
  47. package/schematics/bundles/signal-queries-migration.cjs +1 -1
  48. package/schematics/bundles/signals.cjs +1 -1
  49. package/schematics/bundles/standalone-migration.cjs +20 -6
  50. package/schematics/collection.json +5 -5
  51. package/schematics/migrations.json +9 -30
  52. package/types/_api-chunk.d.ts +31 -4
  53. package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
  54. package/types/_discovery-chunk.d.ts +2 -2
  55. package/types/_effect-chunk.d.ts +1 -1
  56. package/types/_event_dispatcher-chunk.d.ts +1 -1
  57. package/types/_formatter-chunk.d.ts +1 -1
  58. package/types/_weak_ref-chunk.d.ts +1 -1
  59. package/types/core.d.ts +44 -14
  60. package/types/primitives-di.d.ts +1 -1
  61. package/types/primitives-event-dispatch.d.ts +1 -1
  62. package/types/primitives-signals.d.ts +1 -1
  63. package/types/rxjs-interop.d.ts +1 -1
  64. package/types/testing.d.ts +6 -1
  65. package/fesm2022/_effect-chunk2.mjs.map +0 -1
  66. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +0 -117
  67. package/schematics/bundles/application-config-core.cjs +0 -84
  68. package/schematics/bundles/bootstrap-options-migration.cjs +0 -644
  69. package/schematics/bundles/router-current-navigation.cjs +0 -103
  70. package/schematics/bundles/router-last-successful-navigation.cjs +0 -103
  71. package/schematics/bundles/symbol-DZeHSR-V.cjs +0 -26
  72. /package/schematics/{migrations → ng-generate}/common-to-standalone-migration/schema.json +0 -0
  73. /package/schematics/{migrations → ng-generate}/control-flow-migration/schema.json +0 -0
  74. /package/schematics/{migrations → ng-generate}/ngclass-to-class-migration/schema.json +0 -0
  75. /package/schematics/{migrations → ng-generate}/ngstyle-to-style-migration/schema.json +0 -0
  76. /package/schematics/{migrations → ng-generate}/router-testing-module-migration/schema.json +0 -0
@@ -1,117 +0,0 @@
1
- 'use strict';
2
- /**
3
- * @license Angular v21.2.0
4
- * (c) 2010-2026 Google LLC. https://angular.dev/
5
- * License: MIT
6
- */
7
- 'use strict';
8
-
9
- require('@angular-devkit/core');
10
- require('node:path/posix');
11
- var project_paths = require('./project_paths-D2V-Uh2L.cjs');
12
- var migrations = require('@angular/compiler-cli/private/migrations');
13
- var ts = require('typescript');
14
- var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
15
- require('@angular/compiler-cli');
16
- require('node:path');
17
- require('@angular-devkit/schematics');
18
- require('./project_tsconfig_paths-DkkMibv-.cjs');
19
-
20
- function findArrowFunction(node) {
21
- let current = node;
22
- while (current) {
23
- if (ts.isArrowFunction(current)) {
24
- return current;
25
- }
26
- current = current.parent;
27
- }
28
- return undefined;
29
- }
30
- class AddBootstrapContextToServerMainMigration extends project_paths.TsurgeFunnelMigration {
31
- async analyze(info) {
32
- const replacements = [];
33
- let importManager = null;
34
- for (const sourceFile of info.sourceFiles) {
35
- if (!sourceFile.fileName.endsWith('main.server.ts')) {
36
- continue;
37
- }
38
- const bootstrapAppCalls = [];
39
- ts.forEachChild(sourceFile, function findCalls(node) {
40
- if (ts.isCallExpression(node) &&
41
- ts.isIdentifier(node.expression) &&
42
- node.expression.text === 'bootstrapApplication' &&
43
- node.arguments.length < 3) {
44
- bootstrapAppCalls.push(node);
45
- }
46
- ts.forEachChild(node, findCalls);
47
- });
48
- if (bootstrapAppCalls.length === 0) {
49
- continue;
50
- }
51
- for (const node of bootstrapAppCalls) {
52
- const end = node.arguments[node.arguments.length - 1].getEnd();
53
- replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), new project_paths.TextUpdate({
54
- position: end,
55
- end: end,
56
- toInsert: ', context',
57
- })));
58
- const arrowFunction = findArrowFunction(node);
59
- if (arrowFunction && arrowFunction.parameters.length === 0) {
60
- replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), new project_paths.TextUpdate({
61
- position: arrowFunction.parameters.end,
62
- end: arrowFunction.parameters.end,
63
- toInsert: 'context: BootstrapContext',
64
- })));
65
- }
66
- }
67
- importManager ??= new migrations.ImportManager({
68
- generateUniqueIdentifier: () => null,
69
- shouldUseSingleQuotes: () => true,
70
- });
71
- importManager.addImport({
72
- exportSymbolName: 'BootstrapContext',
73
- exportModuleSpecifier: '@angular/platform-browser',
74
- requestedFile: sourceFile,
75
- });
76
- }
77
- if (importManager !== null) {
78
- apply_import_manager.applyImportManagerChanges(importManager, replacements, info.sourceFiles, info);
79
- }
80
- return project_paths.confirmAsSerializable({ replacements });
81
- }
82
- async migrate(globalData) {
83
- return project_paths.confirmAsSerializable(globalData);
84
- }
85
- async combine(unitA, unitB) {
86
- const seen = new Set();
87
- const combined = [];
88
- [unitA.replacements, unitB.replacements].forEach((replacements) => {
89
- replacements.forEach((current) => {
90
- const { position, end, toInsert } = current.update.data;
91
- const key = current.projectFile.id + '/' + position + '/' + end + '/' + toInsert;
92
- if (!seen.has(key)) {
93
- seen.add(key);
94
- combined.push(current);
95
- }
96
- });
97
- });
98
- return project_paths.confirmAsSerializable({ replacements: combined });
99
- }
100
- async globalMeta(combinedData) {
101
- return project_paths.confirmAsSerializable(combinedData);
102
- }
103
- async stats() {
104
- return project_paths.confirmAsSerializable({});
105
- }
106
- }
107
-
108
- function migrate() {
109
- return async (tree) => {
110
- await project_paths.runMigrationInDevkit({
111
- tree,
112
- getMigration: () => new AddBootstrapContextToServerMainMigration(),
113
- });
114
- };
115
- }
116
-
117
- exports.migrate = migrate;
@@ -1,84 +0,0 @@
1
- 'use strict';
2
- /**
3
- * @license Angular v21.2.0
4
- * (c) 2010-2026 Google LLC. https://angular.dev/
5
- * License: MIT
6
- */
7
- 'use strict';
8
-
9
- var migrations = require('@angular/compiler-cli/private/migrations');
10
- var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
11
- require('@angular/compiler-cli');
12
- require('typescript');
13
- require('node:path');
14
- var project_paths = require('./project_paths-D2V-Uh2L.cjs');
15
- var imports = require('./imports-CVmcbVA9.cjs');
16
- require('@angular-devkit/core');
17
- require('node:path/posix');
18
- require('@angular-devkit/schematics');
19
- require('./project_tsconfig_paths-DkkMibv-.cjs');
20
-
21
- /** Migration that moves the import of `ApplicationConfig` from `platform-browser` to `core`. */
22
- class ApplicationConfigCoreMigration extends project_paths.TsurgeFunnelMigration {
23
- async analyze(info) {
24
- const replacements = [];
25
- let importManager = null;
26
- for (const sourceFile of info.sourceFiles) {
27
- const specifier = imports.getImportSpecifier(sourceFile, '@angular/platform-browser', 'ApplicationConfig');
28
- if (!specifier) {
29
- continue;
30
- }
31
- importManager ??= new migrations.ImportManager({
32
- // Prevent the manager from trying to generate a non-conflicting import.
33
- generateUniqueIdentifier: () => null,
34
- shouldUseSingleQuotes: () => true,
35
- });
36
- importManager.removeImport(sourceFile, 'ApplicationConfig', '@angular/platform-browser');
37
- importManager.addImport({
38
- exportSymbolName: 'ApplicationConfig',
39
- exportModuleSpecifier: '@angular/core',
40
- requestedFile: sourceFile,
41
- unsafeAliasOverride: specifier.propertyName ? specifier.name.text : undefined,
42
- });
43
- }
44
- if (importManager !== null) {
45
- apply_import_manager.applyImportManagerChanges(importManager, replacements, info.sourceFiles, info);
46
- }
47
- return project_paths.confirmAsSerializable({ replacements });
48
- }
49
- async migrate(globalData) {
50
- return project_paths.confirmAsSerializable(globalData);
51
- }
52
- async combine(unitA, unitB) {
53
- const seen = new Set();
54
- const combined = [];
55
- [unitA.replacements, unitB.replacements].forEach((replacements) => {
56
- replacements.forEach((current) => {
57
- const { position, end, toInsert } = current.update.data;
58
- const key = current.projectFile.id + '/' + position + '/' + end + '/' + toInsert;
59
- if (!seen.has(key)) {
60
- seen.add(key);
61
- combined.push(current);
62
- }
63
- });
64
- });
65
- return project_paths.confirmAsSerializable({ replacements: combined });
66
- }
67
- async globalMeta(combinedData) {
68
- return project_paths.confirmAsSerializable(combinedData);
69
- }
70
- async stats() {
71
- return project_paths.confirmAsSerializable({});
72
- }
73
- }
74
-
75
- function migrate() {
76
- return async (tree) => {
77
- await project_paths.runMigrationInDevkit({
78
- tree,
79
- getMigration: () => new ApplicationConfigCoreMigration(),
80
- });
81
- };
82
- }
83
-
84
- exports.migrate = migrate;