@angular/core 20.0.0-next.1 → 20.0.0-next.3
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/core.mjs +770 -2144
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +3 -2
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +2 -589
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +44 -13
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +7 -39
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +116 -143
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/weak_ref-DrMdAIDh.mjs +12 -0
- package/fesm2022/weak_ref-DrMdAIDh.mjs.map +1 -0
- package/index.d.ts +14366 -15214
- package/navigation_types.d-u4EOrrdZ.d.ts +121 -0
- package/package.json +2 -2
- package/primitives/di/index.d.ts +66 -59
- package/primitives/event-dispatch/index.d.ts +205 -309
- package/primitives/signals/index.d.ts +161 -195
- package/rxjs-interop/index.d.ts +71 -100
- package/schematics/bundles/{apply_import_manager-e2a7fe5b.js → apply_import_manager-BXQEjo09.js} +15 -19
- package/schematics/bundles/{checker-af521da6.js → checker-BHb19MHt.js} +3695 -1175
- package/schematics/bundles/cleanup-unused-imports.js +56 -89
- package/schematics/bundles/{compiler_host-5a29293c.js → compiler_host-Bk3repE2.js} +19 -23
- package/schematics/bundles/control-flow-migration.js +81 -38
- package/schematics/bundles/{imports-047fbbc8.js → imports-CIX-JgAN.js} +9 -14
- package/schematics/bundles/{index-1bef3025.js → index-BL9kAIe5.js} +62 -66
- package/schematics/bundles/{program-a449f9bf.js → index-I8VbxQcO.js} +1508 -3178
- package/schematics/bundles/inject-flags.js +147 -0
- package/schematics/bundles/inject-migration.js +121 -127
- package/schematics/bundles/{leading_space-f8944434.js → leading_space-D9nQ8UQC.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-2a3e9e6b.js → migrate_ts_type_references-KlOTWeDl.js} +121 -126
- package/schematics/bundles/{ng_decorators-b0d8b324.js → ng_decorators-DznZ5jMl.js} +4 -8
- package/schematics/bundles/{nodes-7758dbf6.js → nodes-B16H9JUd.js} +2 -6
- package/schematics/bundles/output-migration.js +94 -128
- package/schematics/bundles/{project_tsconfig_paths-b558633b.js → project_tsconfig_paths-CDVxT6Ov.js} +1 -1
- package/schematics/bundles/{property_name-ac18447e.js → property_name-BBwFuqMe.js} +3 -7
- package/schematics/bundles/route-lazy-loading.js +35 -41
- package/schematics/bundles/{project_paths-17dc204d.js → run_in_devkit-C0JPtK2u.js} +283 -216
- package/schematics/bundles/self-closing-tags-migration.js +55 -91
- package/schematics/bundles/signal-input-migration.js +121 -156
- package/schematics/bundles/signal-queries-migration.js +119 -154
- package/schematics/bundles/signals.js +12 -14
- package/schematics/bundles/standalone-migration.js +180 -200
- package/schematics/bundles/symbol-VPWguRxr.js +25 -0
- package/schematics/bundles/test-bed-get.js +98 -0
- package/schematics/migrations.json +8 -14
- package/testing/index.d.ts +289 -471
- package/weak_ref.d-ttyj86RV.d.ts +9 -0
- package/schematics/bundles/explicit-standalone-flag.js +0 -184
- package/schematics/bundles/index-ef1bffbb.js +0 -30
- package/schematics/bundles/pending-tasks.js +0 -103
- package/schematics/bundles/provide-initializer.js +0 -186
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @license Angular v20.0.0-next.3
|
|
4
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
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 (ts.isIdentifier(node) && node.text !== importSpecifier.name.text) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
const nodeSymbol = typeChecker.getTypeAtLocation(node).getSymbol();
|
|
20
|
+
const importSymbol = typeChecker.getTypeAtLocation(importSpecifier).getSymbol();
|
|
21
|
+
return (!!(nodeSymbol?.declarations?.[0] && importSymbol?.declarations?.[0]) &&
|
|
22
|
+
nodeSymbol.declarations[0] === importSymbol.declarations[0]);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
exports.isReferenceToImport = isReferenceToImport;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @license Angular v20.0.0-next.3
|
|
4
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var ts = require('typescript');
|
|
10
|
+
require('os');
|
|
11
|
+
require('./checker-BHb19MHt.js');
|
|
12
|
+
require('./index-I8VbxQcO.js');
|
|
13
|
+
require('path');
|
|
14
|
+
var run_in_devkit = require('./run_in_devkit-C0JPtK2u.js');
|
|
15
|
+
var imports = require('./imports-CIX-JgAN.js');
|
|
16
|
+
var symbol = require('./symbol-VPWguRxr.js');
|
|
17
|
+
require('@angular-devkit/core');
|
|
18
|
+
require('node:path/posix');
|
|
19
|
+
require('fs');
|
|
20
|
+
require('module');
|
|
21
|
+
require('url');
|
|
22
|
+
require('@angular-devkit/schematics');
|
|
23
|
+
require('./project_tsconfig_paths-CDVxT6Ov.js');
|
|
24
|
+
|
|
25
|
+
/** Name of the method being replaced. */
|
|
26
|
+
const METHOD_NAME = 'get';
|
|
27
|
+
/** Migration that replaces `TestBed.get` usages with `TestBed.inject`. */
|
|
28
|
+
class TestBedGetMigration extends run_in_devkit.TsurgeFunnelMigration {
|
|
29
|
+
async analyze(info) {
|
|
30
|
+
const locations = [];
|
|
31
|
+
for (const sourceFile of info.sourceFiles) {
|
|
32
|
+
const specifier = imports.getImportSpecifier(sourceFile, '@angular/core/testing', 'TestBed');
|
|
33
|
+
if (specifier === null) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const typeChecker = info.program.getTypeChecker();
|
|
37
|
+
sourceFile.forEachChild(function walk(node) {
|
|
38
|
+
if (ts.isPropertyAccessExpression(node) &&
|
|
39
|
+
node.name.text === METHOD_NAME &&
|
|
40
|
+
ts.isIdentifier(node.expression) &&
|
|
41
|
+
symbol.isReferenceToImport(typeChecker, node.expression, specifier)) {
|
|
42
|
+
locations.push({ file: run_in_devkit.projectFile(sourceFile, info), position: node.name.getStart() });
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
node.forEachChild(walk);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return run_in_devkit.confirmAsSerializable({ locations });
|
|
50
|
+
}
|
|
51
|
+
async migrate(globalData) {
|
|
52
|
+
const replacements = globalData.locations.map(({ file, position }) => {
|
|
53
|
+
return new run_in_devkit.Replacement(file, new run_in_devkit.TextUpdate({
|
|
54
|
+
position: position,
|
|
55
|
+
end: position + METHOD_NAME.length,
|
|
56
|
+
toInsert: 'inject',
|
|
57
|
+
}));
|
|
58
|
+
});
|
|
59
|
+
return run_in_devkit.confirmAsSerializable({ replacements });
|
|
60
|
+
}
|
|
61
|
+
async combine(unitA, unitB) {
|
|
62
|
+
const seen = new Set();
|
|
63
|
+
const locations = [];
|
|
64
|
+
const combined = [...unitA.locations, ...unitB.locations];
|
|
65
|
+
for (const location of combined) {
|
|
66
|
+
const key = `${location.file.id}#${location.position}`;
|
|
67
|
+
if (!seen.has(key)) {
|
|
68
|
+
seen.add(key);
|
|
69
|
+
locations.push(location);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return run_in_devkit.confirmAsSerializable({ locations });
|
|
73
|
+
}
|
|
74
|
+
async globalMeta(combinedData) {
|
|
75
|
+
return run_in_devkit.confirmAsSerializable(combinedData);
|
|
76
|
+
}
|
|
77
|
+
async stats() {
|
|
78
|
+
return { counters: {} };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/*!
|
|
83
|
+
* @license
|
|
84
|
+
* Copyright Google LLC All Rights Reserved.
|
|
85
|
+
*
|
|
86
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
87
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
88
|
+
*/
|
|
89
|
+
function migrate() {
|
|
90
|
+
return async (tree) => {
|
|
91
|
+
await run_in_devkit.runMigrationInDevkit({
|
|
92
|
+
tree,
|
|
93
|
+
getMigration: () => new TestBedGetMigration(),
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
exports.migrate = migrate;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
|
-
"
|
|
4
|
-
"version": "
|
|
5
|
-
"description": "
|
|
6
|
-
"factory": "./bundles/
|
|
3
|
+
"inject-flags": {
|
|
4
|
+
"version": "20.0.0",
|
|
5
|
+
"description": "Replaces usages of the deprecated InjectFlags enum",
|
|
6
|
+
"factory": "./bundles/inject-flags#migrate"
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
"version": "
|
|
10
|
-
"description": "
|
|
11
|
-
"factory": "./bundles/
|
|
12
|
-
},
|
|
13
|
-
"provide-initializer": {
|
|
14
|
-
"version": "19.0.0",
|
|
15
|
-
"description": "Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`.",
|
|
16
|
-
"factory": "./bundles/provide-initializer#migrate",
|
|
17
|
-
"optional": true
|
|
8
|
+
"test-bed-get": {
|
|
9
|
+
"version": "20.0.0",
|
|
10
|
+
"description": "Replaces usages of the deprecated TestBed.get method with TestBed.inject",
|
|
11
|
+
"factory": "./bundles/test-bed-get#migrate"
|
|
18
12
|
}
|
|
19
13
|
}
|
|
20
14
|
}
|