@angular/core 21.2.1 → 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.
- package/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_debug_node-chunk.mjs +523 -471
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/{_effect-chunk2.mjs → _pending_tasks-chunk.mjs} +31 -31
- package/fesm2022/_pending_tasks-chunk.mjs.map +1 -0
- package/fesm2022/_resource-chunk.mjs +91 -32
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/core.mjs +5 -5
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +1 -1
- package/fesm2022/primitives-signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/testing.mjs +14 -2
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +3 -3
- package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
- package/schematics/bundles/change-detection-eager.cjs +155 -0
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +4 -4
- package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/http-xhr-backend.cjs +118 -0
- package/schematics/bundles/{imports-CVmcbVA9.cjs → imports-CKV-ITqD.cjs} +4 -3
- package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-MWoZx-Cb.cjs +1 -1
- package/schematics/bundles/{ng_component_template-BOuKAnQd.cjs → ng_component_template-DPAF1aEA.cjs} +2 -2
- package/schematics/bundles/{ng_decorators-DYy6II6x.cjs → ng_decorators-IVztR9rk.cjs} +2 -2
- package/schematics/bundles/ngclass-to-class-migration.cjs +4 -4
- package/schematics/bundles/ngstyle-to-style-migration.cjs +4 -4
- package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
- package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
- package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +4 -16
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +20 -6
- package/schematics/collection.json +5 -5
- package/schematics/migrations.json +9 -30
- package/types/_api-chunk.d.ts +31 -4
- package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
- package/types/_discovery-chunk.d.ts +2 -2
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +42 -12
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +1 -1
- package/types/testing.d.ts +6 -1
- package/fesm2022/_effect-chunk2.mjs.map +0 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +0 -117
- package/schematics/bundles/application-config-core.cjs +0 -84
- package/schematics/bundles/bootstrap-options-migration.cjs +0 -644
- package/schematics/bundles/router-current-navigation.cjs +0 -103
- package/schematics/bundles/router-last-successful-navigation.cjs +0 -103
- package/schematics/bundles/symbol-DZeHSR-V.cjs +0 -26
- /package/schematics/{migrations → ng-generate}/common-to-standalone-migration/schema.json +0 -0
- /package/schematics/{migrations → ng-generate}/control-flow-migration/schema.json +0 -0
- /package/schematics/{migrations → ng-generate}/ngclass-to-class-migration/schema.json +0 -0
- /package/schematics/{migrations → ng-generate}/ngstyle-to-style-migration/schema.json +0 -0
- /package/schematics/{migrations → ng-generate}/router-testing-module-migration/schema.json +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/**
|
|
3
|
-
* @license Angular v21.2.1
|
|
4
|
-
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
|
-
* License: MIT
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
var ts = require('typescript');
|
|
10
|
-
require('@angular/compiler-cli');
|
|
11
|
-
require('@angular/compiler-cli/private/migrations');
|
|
12
|
-
require('node:path');
|
|
13
|
-
var project_paths = require('./project_paths-D2V-Uh2L.cjs');
|
|
14
|
-
var imports = require('./imports-CVmcbVA9.cjs');
|
|
15
|
-
var symbol = require('./symbol-DZeHSR-V.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
|
-
/** Name of the method being replaced. */
|
|
22
|
-
const METHOD_NAME = 'getCurrentNavigation';
|
|
23
|
-
/** Migration that replaces `Router.getCurrentNavigation` usages with `Router.currentNavigation()`. */
|
|
24
|
-
class RouterCurrentNavigationMigration extends project_paths.TsurgeFunnelMigration {
|
|
25
|
-
async analyze(info) {
|
|
26
|
-
const locations = [];
|
|
27
|
-
for (const sourceFile of info.sourceFiles) {
|
|
28
|
-
const routerSpecifier = imports.getImportSpecifier(sourceFile, '@angular/router', 'Router');
|
|
29
|
-
if (routerSpecifier === null) {
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
const typeChecker = info.program.getTypeChecker();
|
|
33
|
-
sourceFile.forEachChild(function walk(node) {
|
|
34
|
-
if (ts.isPropertyAccessExpression(node) &&
|
|
35
|
-
node.name.text === METHOD_NAME &&
|
|
36
|
-
isRouterType(typeChecker, node.expression, routerSpecifier)) {
|
|
37
|
-
locations.push({ file: project_paths.projectFile(sourceFile, info), position: node.name.getStart() });
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
node.forEachChild(walk);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return project_paths.confirmAsSerializable({ locations });
|
|
45
|
-
}
|
|
46
|
-
async migrate(globalData) {
|
|
47
|
-
const replacements = globalData.locations.map(({ file, position }) => {
|
|
48
|
-
return new project_paths.Replacement(file, new project_paths.TextUpdate({
|
|
49
|
-
position: position,
|
|
50
|
-
end: position + METHOD_NAME.length,
|
|
51
|
-
toInsert: 'currentNavigation',
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
return project_paths.confirmAsSerializable({ replacements });
|
|
55
|
-
}
|
|
56
|
-
async combine(unitA, unitB) {
|
|
57
|
-
const seen = new Set();
|
|
58
|
-
const locations = [];
|
|
59
|
-
const combined = [...unitA.locations, ...unitB.locations];
|
|
60
|
-
for (const location of combined) {
|
|
61
|
-
const key = `${location.file.id}#${location.position}`;
|
|
62
|
-
if (!seen.has(key)) {
|
|
63
|
-
seen.add(key);
|
|
64
|
-
locations.push(location);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return project_paths.confirmAsSerializable({ locations });
|
|
68
|
-
}
|
|
69
|
-
async globalMeta(combinedData) {
|
|
70
|
-
return project_paths.confirmAsSerializable(combinedData);
|
|
71
|
-
}
|
|
72
|
-
async stats() {
|
|
73
|
-
return project_paths.confirmAsSerializable({});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Checks if the given symbol represents a Router type.
|
|
78
|
-
*/
|
|
79
|
-
function isRouterType(typeChecker, expression, routerSpecifier) {
|
|
80
|
-
const expressionType = typeChecker.getTypeAtLocation(expression);
|
|
81
|
-
const expressionSymbol = expressionType.getSymbol();
|
|
82
|
-
if (!expressionSymbol) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
const declarations = expressionSymbol.getDeclarations() ?? [];
|
|
86
|
-
for (const declaration of declarations) {
|
|
87
|
-
if (symbol.isReferenceToImport(typeChecker, declaration, routerSpecifier)) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return declarations.some((decl) => decl === routerSpecifier);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function migrate() {
|
|
95
|
-
return async (tree) => {
|
|
96
|
-
await project_paths.runMigrationInDevkit({
|
|
97
|
-
tree,
|
|
98
|
-
getMigration: () => new RouterCurrentNavigationMigration(),
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
exports.migrate = migrate;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/**
|
|
3
|
-
* @license Angular v21.2.1
|
|
4
|
-
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
|
-
* License: MIT
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
var ts = require('typescript');
|
|
10
|
-
require('@angular/compiler-cli');
|
|
11
|
-
require('@angular/compiler-cli/private/migrations');
|
|
12
|
-
require('node:path');
|
|
13
|
-
var project_paths = require('./project_paths-D2V-Uh2L.cjs');
|
|
14
|
-
var imports = require('./imports-CVmcbVA9.cjs');
|
|
15
|
-
var symbol = require('./symbol-DZeHSR-V.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
|
-
/** Name of the method being replaced. */
|
|
22
|
-
const METHOD_NAME = 'lastSuccessfulNavigation';
|
|
23
|
-
/** Migration that replaces `Router.lastSuccessfulNavigation` usages with `Router.lastSuccessfulNavigation()`. */
|
|
24
|
-
class RouterLastSuccessfulNavigationMigration extends project_paths.TsurgeFunnelMigration {
|
|
25
|
-
async analyze(info) {
|
|
26
|
-
const locations = [];
|
|
27
|
-
for (const sourceFile of info.sourceFiles) {
|
|
28
|
-
const routerSpecifier = imports.getImportSpecifier(sourceFile, '@angular/router', 'Router');
|
|
29
|
-
if (routerSpecifier === null) {
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
const typeChecker = info.program.getTypeChecker();
|
|
33
|
-
sourceFile.forEachChild(function walk(node) {
|
|
34
|
-
if (ts.isPropertyAccessExpression(node) &&
|
|
35
|
-
node.name.text === METHOD_NAME &&
|
|
36
|
-
isRouterType(typeChecker, node.expression, routerSpecifier)) {
|
|
37
|
-
locations.push({ file: project_paths.projectFile(sourceFile, info), position: node.name.getStart() });
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
node.forEachChild(walk);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return project_paths.confirmAsSerializable({ locations });
|
|
45
|
-
}
|
|
46
|
-
async migrate(globalData) {
|
|
47
|
-
const replacements = globalData.locations.map(({ file, position }) => {
|
|
48
|
-
return new project_paths.Replacement(file, new project_paths.TextUpdate({
|
|
49
|
-
position: position,
|
|
50
|
-
end: position + METHOD_NAME.length,
|
|
51
|
-
toInsert: 'lastSuccessfulNavigation()',
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
return project_paths.confirmAsSerializable({ replacements });
|
|
55
|
-
}
|
|
56
|
-
async combine(unitA, unitB) {
|
|
57
|
-
const seen = new Set();
|
|
58
|
-
const locations = [];
|
|
59
|
-
const combined = [...unitA.locations, ...unitB.locations];
|
|
60
|
-
for (const location of combined) {
|
|
61
|
-
const key = `${location.file.id}#${location.position}`;
|
|
62
|
-
if (!seen.has(key)) {
|
|
63
|
-
seen.add(key);
|
|
64
|
-
locations.push(location);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return project_paths.confirmAsSerializable({ locations });
|
|
68
|
-
}
|
|
69
|
-
async globalMeta(combinedData) {
|
|
70
|
-
return project_paths.confirmAsSerializable(combinedData);
|
|
71
|
-
}
|
|
72
|
-
async stats() {
|
|
73
|
-
return project_paths.confirmAsSerializable({});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Checks if the given symbol represents a Router type.
|
|
78
|
-
*/
|
|
79
|
-
function isRouterType(typeChecker, expression, routerSpecifier) {
|
|
80
|
-
const expressionType = typeChecker.getTypeAtLocation(expression);
|
|
81
|
-
const expressionSymbol = expressionType.getSymbol();
|
|
82
|
-
if (!expressionSymbol) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
const declarations = expressionSymbol.getDeclarations() ?? [];
|
|
86
|
-
for (const declaration of declarations) {
|
|
87
|
-
if (symbol.isReferenceToImport(typeChecker, declaration, routerSpecifier)) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return declarations.some((decl) => decl === routerSpecifier);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function migrate() {
|
|
95
|
-
return async (tree) => {
|
|
96
|
-
await project_paths.runMigrationInDevkit({
|
|
97
|
-
tree,
|
|
98
|
-
getMigration: () => new RouterLastSuccessfulNavigationMigration(),
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
exports.migrate = migrate;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/**
|
|
3
|
-
* @license Angular v21.2.1
|
|
4
|
-
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
|
-
* License: MIT
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
var ts = require('typescript');
|
|
10
|
-
|
|
11
|
-
/** Checks whether a node is referring to a specific import specifier. */
|
|
12
|
-
function isReferenceToImport(typeChecker, node, importSpecifier) {
|
|
13
|
-
// If this function is called on an identifier (should be most cases), we can quickly rule out
|
|
14
|
-
// non-matches by comparing the identifier's string and the local name of the import specifier
|
|
15
|
-
// which saves us some calls to the type checker.
|
|
16
|
-
if (importSpecifier === null ||
|
|
17
|
-
(ts.isIdentifier(node) && node.text !== importSpecifier.name.text)) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
const nodeSymbol = typeChecker.getTypeAtLocation(node).getSymbol();
|
|
21
|
-
const importSymbol = typeChecker.getTypeAtLocation(importSpecifier).getSymbol();
|
|
22
|
-
return (!!(nodeSymbol?.declarations?.[0] && importSymbol?.declarations?.[0]) &&
|
|
23
|
-
nodeSymbol.declarations[0] === importSymbol.declarations[0]);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
exports.isReferenceToImport = isReferenceToImport;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|