@angular/core 21.2.5 → 21.2.6
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 +4 -2
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_effect-chunk2.mjs +2 -2
- package/fesm2022/_effect-chunk2.mjs.map +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_resource-chunk.mjs +1 -1
- package/fesm2022/_untracked-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- 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 +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
- package/schematics/bundles/application-config-core.cjs +1 -1
- package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
- package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/imports-CVmcbVA9.cjs +1 -1
- package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +26 -18
- 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 +1 -1
- package/schematics/bundles/ng_decorators-DYy6II6x.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- 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 +1 -1
- package/schematics/bundles/router-current-navigation.cjs +1 -1
- package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- 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 +1 -1
- package/schematics/bundles/symbol-DZeHSR-V.cjs +1 -1
- package/types/_api-chunk.d.ts +1 -1
- package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
- package/types/_discovery-chunk.d.ts +5 -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 +1 -1
- 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 +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.6",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/compiler": "21.2.
|
|
49
|
+
"@angular/compiler": "21.2.6",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
51
51
|
"zone.js": "~0.15.0 || ~0.16.0"
|
|
52
52
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.2.
|
|
3
|
+
* @license Angular v21.2.6
|
|
4
4
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1321,31 +1321,37 @@ function isStringType(node, checker) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
1323
|
function migrate(options) {
|
|
1324
|
-
return async (tree) => {
|
|
1325
|
-
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
|
|
1324
|
+
return async (tree, context) => {
|
|
1326
1325
|
const basePath = process.cwd();
|
|
1326
|
+
let pathToMigrate;
|
|
1327
|
+
if (options.path) {
|
|
1328
|
+
if (options.path.startsWith('..')) {
|
|
1329
|
+
throw new schematics.SchematicsException('Cannot run inject migration outside of the current project.');
|
|
1330
|
+
}
|
|
1331
|
+
pathToMigrate = compiler_host.normalizePath(path.join(basePath, options.path));
|
|
1332
|
+
}
|
|
1333
|
+
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
|
|
1327
1334
|
const allPaths = [...buildPaths, ...testPaths];
|
|
1328
|
-
const pathToMigrate = compiler_host.normalizePath(path.join(basePath, options.path));
|
|
1329
1335
|
if (!allPaths.length) {
|
|
1330
|
-
|
|
1336
|
+
context.logger.warn('Could not find any tsconfig file. Cannot run the inject migration.');
|
|
1337
|
+
return;
|
|
1331
1338
|
}
|
|
1339
|
+
let sourceFilesCount = 0;
|
|
1332
1340
|
for (const tsconfigPath of allPaths) {
|
|
1333
|
-
|
|
1341
|
+
const program = compiler_host.createMigrationProgram(tree, tsconfigPath, basePath);
|
|
1342
|
+
const sourceFiles = program
|
|
1343
|
+
.getSourceFiles()
|
|
1344
|
+
.filter((sourceFile) => (pathToMigrate ? sourceFile.fileName.startsWith(pathToMigrate) : true) &&
|
|
1345
|
+
compiler_host.canMigrateFile(basePath, sourceFile, program));
|
|
1346
|
+
sourceFilesCount += runInjectMigration(tree, sourceFiles, basePath, options);
|
|
1347
|
+
}
|
|
1348
|
+
if (sourceFilesCount === 0) {
|
|
1349
|
+
context.logger.warn('Inject migration did not find any files to migrate');
|
|
1334
1350
|
}
|
|
1335
1351
|
};
|
|
1336
1352
|
}
|
|
1337
|
-
function runInjectMigration(tree,
|
|
1338
|
-
|
|
1339
|
-
throw new schematics.SchematicsException('Cannot run inject migration outside of the current project.');
|
|
1340
|
-
}
|
|
1341
|
-
const program = compiler_host.createMigrationProgram(tree, tsconfigPath, basePath);
|
|
1342
|
-
const sourceFiles = program
|
|
1343
|
-
.getSourceFiles()
|
|
1344
|
-
.filter((sourceFile) => sourceFile.fileName.startsWith(pathToMigrate) &&
|
|
1345
|
-
compiler_host.canMigrateFile(basePath, sourceFile, program));
|
|
1346
|
-
if (sourceFiles.length === 0) {
|
|
1347
|
-
throw new schematics.SchematicsException(`Could not find any files to migrate under the path ${pathToMigrate}. Cannot run the inject migration.`);
|
|
1348
|
-
}
|
|
1353
|
+
function runInjectMigration(tree, sourceFiles, basePath, schematicOptions) {
|
|
1354
|
+
let migratedFiles = 0;
|
|
1349
1355
|
for (const sourceFile of sourceFiles) {
|
|
1350
1356
|
const changes = migrateFile(sourceFile, schematicOptions);
|
|
1351
1357
|
if (changes.length > 0) {
|
|
@@ -1357,8 +1363,10 @@ function runInjectMigration(tree, tsconfigPath, basePath, pathToMigrate, schemat
|
|
|
1357
1363
|
update.insertRight(change.start, change.text);
|
|
1358
1364
|
}
|
|
1359
1365
|
tree.commitUpdate(update);
|
|
1366
|
+
migratedFiles++;
|
|
1360
1367
|
}
|
|
1361
1368
|
}
|
|
1369
|
+
return migratedFiles;
|
|
1362
1370
|
}
|
|
1363
1371
|
|
|
1364
1372
|
exports.migrate = migrate;
|
package/types/_api-chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.2.
|
|
2
|
+
* @license Angular v21.2.6
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -5172,6 +5172,9 @@ interface ComponentDecorator {
|
|
|
5172
5172
|
* life-cycle hooks. For more information, see the
|
|
5173
5173
|
* [Lifecycle Hooks](guide/components/lifecycle) guide.
|
|
5174
5174
|
*
|
|
5175
|
+
* HELPFUL: You may not use this interface to describe a class that is a component. Decorators do not affect the typing of the decorated classes.
|
|
5176
|
+
* Use `Type<unknown>` instead of `Type<Component>`.
|
|
5177
|
+
*
|
|
5175
5178
|
* @usageNotes
|
|
5176
5179
|
*
|
|
5177
5180
|
* ### Setting component inputs
|
|
@@ -5506,7 +5509,7 @@ interface InputDecorator {
|
|
|
5506
5509
|
* class BankAccount {
|
|
5507
5510
|
* // This property is bound using its original name.
|
|
5508
5511
|
* // Defining argument required as true inside the Input Decorator
|
|
5509
|
-
* // makes this property
|
|
5512
|
+
* // makes this property declaration as mandatory
|
|
5510
5513
|
* @Input({ required: true }) bankName!: string;
|
|
5511
5514
|
* // Argument alias makes this property value is bound to a different property name
|
|
5512
5515
|
* // when this component is instantiated in a template.
|
package/types/_effect-chunk.d.ts
CHANGED
package/types/core.d.ts
CHANGED
package/types/primitives-di.d.ts
CHANGED
package/types/rxjs-interop.d.ts
CHANGED
package/types/testing.d.ts
CHANGED