@angular/core 21.0.0-next.3 → 21.0.0-next.5
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/api.d.d.ts +7 -4
- package/chrome_dev_tools_performance.d.d.ts +1 -1
- package/discovery.d.d.ts +48 -21
- package/effect.d.d.ts +1 -2
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/attribute.mjs.map +1 -1
- package/fesm2022/core.mjs +228 -72
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +564 -747
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +3 -4
- package/fesm2022/effect.mjs.map +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/not_found.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +4 -5
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/resource.mjs +5 -4
- package/fesm2022/resource.mjs.map +1 -1
- package/fesm2022/root_effect_scheduler.mjs +61 -45
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +3 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal.mjs +32 -11
- package/fesm2022/signal.mjs.map +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/fesm2022/weak_ref.mjs.map +1 -1
- package/graph.d.d.ts +24 -4
- package/index.d.ts +19 -140
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +2 -3
- package/rxjs-interop/index.d.ts +3 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
- package/schematics/bundles/application-config-core.cjs +6 -6
- package/schematics/bundles/{apply_import_manager-tNexl58m.cjs → apply_import_manager-Bx60Uquz.cjs} +3 -3
- package/schematics/bundles/bootstrap-options-migration.cjs +637 -0
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-Df7s6Riz.cjs → compiler_host-Aouk-n4F.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +71 -39
- package/schematics/bundles/{imports-26VeX8i-.cjs → imports-DwPXlGFl.cjs} +27 -1
- package/schematics/bundles/{index-Clvp4COX.cjs → index-BZQb51Qf.cjs} +4 -4
- package/schematics/bundles/{index-CBaykQBv.cjs → index-Bb6iejCd.cjs} +130 -41
- package/schematics/bundles/inject-migration.cjs +5 -5
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-C_gTvDtH.cjs → migrate_ts_type_references-By2ZtKls.cjs} +5 -5
- package/schematics/bundles/{ng_component_template-HYGPuVhy.cjs → ng_component_template-B4M8mTyv.cjs} +3 -3
- package/schematics/bundles/{ng_decorators-CtYwz9Lw.cjs → ng_decorators-BI0uV7KI.cjs} +2 -2
- package/schematics/bundles/ngclass-to-class-migration.cjs +110 -98
- package/schematics/bundles/ngstyle-to-style-migration.cjs +490 -0
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/parse_html-7Wl_HDnw.cjs +132 -0
- package/schematics/bundles/{project_paths-BJTqcWvC.cjs → project_paths-Dr2s3Pq3.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-bRwOJEk9.cjs → project_tsconfig_paths-DX9KHLn9.cjs} +423 -236
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +48 -4
- package/schematics/bundles/router-current-navigation.cjs +6 -6
- package/schematics/bundles/router-last-successful-navigation.cjs +6 -6
- package/schematics/bundles/self-closing-tags-migration.cjs +8 -8
- package/schematics/bundles/signal-input-migration.cjs +17 -9
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +17 -10
- package/schematics/bundles/{symbol-VPWguRxr.cjs → symbol-BObKoqes.cjs} +3 -2
- package/schematics/collection.json +6 -0
- package/schematics/migrations/ngstyle-to-style-migration/schema.json +20 -0
- package/schematics/migrations.json +5 -0
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
- package/schematics/bundles/parse_html-CLFKoiOK.cjs +0 -41
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var fs = require('fs');
|
|
11
11
|
var p = require('path');
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
13
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
+
var compiler_host = require('./compiler_host-Aouk-n4F.cjs');
|
|
13
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
14
14
|
var ts = require('typescript');
|
|
15
15
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
16
16
|
require('os');
|
|
@@ -208,7 +208,7 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
if (ts.isVariableDeclaration(node)) {
|
|
211
|
+
else if (ts.isVariableDeclaration(node)) {
|
|
212
212
|
if (isAngularRoutesArray(node, typeChecker)) {
|
|
213
213
|
const initializer = node.initializer;
|
|
214
214
|
if (initializer &&
|
|
@@ -227,6 +227,33 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
+
else if (ts.isExportAssignment(node)) {
|
|
231
|
+
// Handles `export default routes`, `export default [...]` and `export default [...] as Routes`
|
|
232
|
+
let expression = node.expression;
|
|
233
|
+
if (ts.isAsExpression(expression)) {
|
|
234
|
+
expression = expression.expression;
|
|
235
|
+
}
|
|
236
|
+
if (ts.isArrayLiteralExpression(expression)) {
|
|
237
|
+
routesArrays.push({
|
|
238
|
+
routeFilePath: sourceFile.fileName,
|
|
239
|
+
array: expression,
|
|
240
|
+
routeFileImports: sourceFile.statements.filter(ts.isImportDeclaration),
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
else if (ts.isIdentifier(expression)) {
|
|
244
|
+
manageRoutesExportedByDefault(routesArrays, typeChecker, expression, sourceFile);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else if (ts.isExportDeclaration(node)) {
|
|
248
|
+
// Handles cases like `export { routes as default }`
|
|
249
|
+
if (node.exportClause && ts.isNamedExports(node.exportClause)) {
|
|
250
|
+
for (const specifier of node.exportClause.elements) {
|
|
251
|
+
if (specifier.name.text === 'default') {
|
|
252
|
+
manageRoutesExportedByDefault(routesArrays, typeChecker, specifier.propertyName ?? specifier.name, sourceFile);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
230
257
|
node.forEachChild(walk);
|
|
231
258
|
});
|
|
232
259
|
return routesArrays;
|
|
@@ -333,6 +360,23 @@ function createLoadComponentPropertyAssignment(componentImportPath, componentDec
|
|
|
333
360
|
// will generate import('./path).then(m => m.componentName)
|
|
334
361
|
ts.factory.createPropertyAccessExpression(createImportCallExpression(componentImportPath), 'then'), undefined, [createImportThenCallExpression(componentDeclarationName)])));
|
|
335
362
|
}
|
|
363
|
+
const manageRoutesExportedByDefault = (routesArrays, typeChecker, expression, sourceFile) => {
|
|
364
|
+
const symbol = typeChecker.getSymbolAtLocation(expression);
|
|
365
|
+
if (!symbol?.declarations) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
for (const declaration of symbol.declarations) {
|
|
369
|
+
if (ts.isVariableDeclaration(declaration) &&
|
|
370
|
+
declaration.initializer &&
|
|
371
|
+
ts.isArrayLiteralExpression(declaration.initializer)) {
|
|
372
|
+
routesArrays.push({
|
|
373
|
+
routeFilePath: sourceFile.fileName,
|
|
374
|
+
array: declaration.initializer,
|
|
375
|
+
routeFileImports: sourceFile.statements.filter(ts.isImportDeclaration),
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
};
|
|
336
380
|
// import('./path)
|
|
337
381
|
const createImportCallExpression = (componentImportPath) => ts.factory.createCallExpression(ts.factory.createIdentifier('import'), undefined, [
|
|
338
382
|
ts.factory.createStringLiteral(componentImportPath, true),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
12
|
+
require('./index-Bb6iejCd.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var imports = require('./imports-
|
|
17
|
-
var symbol = require('./symbol-
|
|
15
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
16
|
+
var imports = require('./imports-DwPXlGFl.cjs');
|
|
17
|
+
var symbol = require('./symbol-BObKoqes.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('fs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
12
|
+
require('./index-Bb6iejCd.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var imports = require('./imports-
|
|
17
|
-
var symbol = require('./symbol-
|
|
15
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
16
|
+
var imports = require('./imports-DwPXlGFl.cjs');
|
|
17
|
+
var symbol = require('./symbol-BObKoqes.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('fs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
12
|
+
require('./index-Bb6iejCd.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var ng_component_template = require('./ng_component_template-
|
|
17
|
-
var parse_html = require('./parse_html-
|
|
15
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
16
|
+
var ng_component_template = require('./ng_component_template-B4M8mTyv.cjs');
|
|
17
|
+
var parse_html = require('./parse_html-7Wl_HDnw.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
22
22
|
require('url');
|
|
23
23
|
require('@angular-devkit/schematics');
|
|
24
|
-
require('./ng_decorators-
|
|
25
|
-
require('./imports-
|
|
24
|
+
require('./ng_decorators-BI0uV7KI.cjs');
|
|
25
|
+
require('./imports-DwPXlGFl.cjs');
|
|
26
26
|
require('./property_name-BBwFuqMe.cjs');
|
|
27
27
|
|
|
28
28
|
function migrateTemplateToSelfClosingTags(template) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
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-
|
|
9
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-By2ZtKls.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
13
|
-
var index$1 = require('./index-
|
|
12
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
13
|
+
var index$1 = require('./index-Bb6iejCd.cjs');
|
|
14
14
|
require('path');
|
|
15
15
|
require('node:path');
|
|
16
|
-
var project_paths = require('./project_paths-
|
|
17
|
-
var index = require('./index-
|
|
16
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
17
|
+
var index = require('./index-BZQb51Qf.cjs');
|
|
18
18
|
var assert = require('assert');
|
|
19
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
19
|
+
var apply_import_manager = require('./apply_import_manager-Bx60Uquz.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
|
-
|
|
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
|
|
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.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
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-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
|
-
var index$1 = require('./index-
|
|
12
|
+
var index$1 = require('./index-Bb6iejCd.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
17
|
-
var migrate_ts_type_references = require('./migrate_ts_type_references-
|
|
15
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-Bx60Uquz.cjs');
|
|
17
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-By2ZtKls.cjs');
|
|
18
18
|
var assert = require('assert');
|
|
19
|
-
var index = require('./index-
|
|
19
|
+
var index = require('./index-BZQb51Qf.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.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
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-
|
|
13
|
+
require('./project_tsconfig_paths-DX9KHLn9.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-
|
|
21
|
+
require('./index-Bb6iejCd.cjs');
|
|
22
22
|
require('node:path');
|
|
23
|
-
require('./project_paths-
|
|
23
|
+
require('./project_paths-Dr2s3Pq3.cjs');
|
|
24
24
|
require('node:path/posix');
|
|
25
|
-
require('./apply_import_manager-
|
|
26
|
-
require('./migrate_ts_type_references-
|
|
25
|
+
require('./apply_import_manager-Bx60Uquz.cjs');
|
|
26
|
+
require('./migrate_ts_type_references-By2ZtKls.cjs');
|
|
27
27
|
require('assert');
|
|
28
|
-
require('./index-
|
|
28
|
+
require('./index-BZQb51Qf.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.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
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-
|
|
10
|
+
var index = require('./index-Bb6iejCd.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-
|
|
15
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
16
|
-
var ng_decorators = require('./ng_decorators-
|
|
14
|
+
var compiler_host = require('./compiler_host-Aouk-n4F.cjs');
|
|
15
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
16
|
+
var ng_decorators = require('./ng_decorators-BI0uV7KI.cjs');
|
|
17
17
|
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
18
|
-
var symbol = require('./symbol-
|
|
19
|
-
var imports = require('./imports-
|
|
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');
|
|
@@ -402,9 +402,16 @@ function getComponentImportExpressions(decl, allDeclarations, tracker, typeCheck
|
|
|
402
402
|
const importLocation = findImportLocation(dep, decl, usedDependenciesInMigration.has(dep)
|
|
403
403
|
? project_tsconfig_paths.PotentialImportMode.ForceDirect
|
|
404
404
|
: project_tsconfig_paths.PotentialImportMode.Normal, typeChecker);
|
|
405
|
-
if (importLocation
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
if (importLocation) {
|
|
406
|
+
// Create a unique key that includes both the symbol name and module specifier
|
|
407
|
+
// to handle cases where the same symbol name is imported from different modules
|
|
408
|
+
const importKey = importLocation.moduleSpecifier
|
|
409
|
+
? `${importLocation.symbolName}::${importLocation.moduleSpecifier}`
|
|
410
|
+
: importLocation.symbolName;
|
|
411
|
+
if (!seenImports.has(importKey)) {
|
|
412
|
+
seenImports.add(importKey);
|
|
413
|
+
resolvedDependencies.push(importLocation);
|
|
414
|
+
}
|
|
408
415
|
}
|
|
409
416
|
}
|
|
410
417
|
return potentialImportsToExpressions(resolvedDependencies, decl.getSourceFile(), tracker, importRemapper);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
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 (
|
|
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
|
}
|
|
@@ -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
|
+
}
|
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
"version": "21.0.0",
|
|
27
27
|
"description": "Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering.",
|
|
28
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"
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
}
|
package/testing/index.d.ts
CHANGED
package/weak_ref.d.d.ts
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/**
|
|
3
|
-
* @license Angular v21.0.0-next.3
|
|
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-bRwOJEk9.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;
|