@angular/core 20.3.3 → 20.3.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 +2 -2
- package/chrome_dev_tools_performance.d.d.ts +4 -2
- package/discovery.d.d.ts +11 -4
- package/effect.d.d.ts +2 -2
- package/event_dispatcher.d.d.ts +2 -2
- package/fesm2022/attribute.mjs +2 -2
- package/fesm2022/attribute.mjs.map +1 -1
- package/fesm2022/core.mjs +3 -3
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +225 -106
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +2 -2
- package/fesm2022/effect.mjs.map +1 -1
- package/fesm2022/not_found.mjs +2 -2
- package/fesm2022/not_found.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +2 -2
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +2 -2
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +2 -2
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/resource.mjs +2 -2
- package/fesm2022/resource.mjs.map +1 -1
- package/fesm2022/root_effect_scheduler.mjs +8 -3
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal.mjs +2 -2
- package/fesm2022/signal.mjs.map +1 -1
- package/fesm2022/testing.mjs +2 -2
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/weak_ref.mjs +2 -2
- package/fesm2022/weak_ref.mjs.map +1 -1
- package/formatter.d.d.ts +2 -2
- package/index.d.ts +16 -9
- package/package.json +2 -2
- package/primitives/di/index.d.ts +2 -2
- package/primitives/event-dispatch/index.d.ts +2 -2
- package/primitives/signals/index.d.ts +2 -2
- package/rxjs-interop/index.d.ts +2 -2
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
- package/schematics/bundles/{apply_import_manager-CUBvPp_2.cjs → apply_import_manager-_3Mx7H7A.cjs} +3 -3
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-DJHZ7M9N.cjs → compiler_host-DXiKJabk.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +21 -20
- package/schematics/bundles/document-core.cjs +5 -5
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-BZJ8bv9v.cjs → index-BDeOF3Gn.cjs} +125 -58
- package/schematics/bundles/{index-DU_evmAi.cjs → index-C8BhVtUr.cjs} +4 -4
- package/schematics/bundles/inject-flags.cjs +5 -5
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-58gA72Ti.cjs → migrate_ts_type_references-BlSjvHVC.cjs} +47 -5
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{project_paths-DcM18127.cjs → project_paths-C8LDPZ5A.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-Dqd0J7st.cjs → project_tsconfig_paths-tTmeFlcz.cjs} +145 -3
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
- package/schematics/bundles/signal-input-migration.cjs +7 -7
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +50 -10
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -4
- package/testing/index.d.ts +2 -2
- package/weak_ref.d.d.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -2876,6 +2876,16 @@ class Identifiers {
|
|
|
2876
2876
|
name: 'ɵɵvalidateIframeAttribute',
|
|
2877
2877
|
moduleName: CORE,
|
|
2878
2878
|
};
|
|
2879
|
+
// Decorators
|
|
2880
|
+
static inputDecorator = { name: 'Input', moduleName: CORE };
|
|
2881
|
+
static outputDecorator = { name: 'Output', moduleName: CORE };
|
|
2882
|
+
static viewChildDecorator = { name: 'ViewChild', moduleName: CORE };
|
|
2883
|
+
static viewChildrenDecorator = { name: 'ViewChildren', moduleName: CORE };
|
|
2884
|
+
static contentChildDecorator = { name: 'ContentChild', moduleName: CORE };
|
|
2885
|
+
static contentChildrenDecorator = {
|
|
2886
|
+
name: 'ContentChildren',
|
|
2887
|
+
moduleName: CORE,
|
|
2888
|
+
};
|
|
2879
2889
|
// type-checking
|
|
2880
2890
|
static InputSignalBrandWriteType = { name: 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE', moduleName: CORE };
|
|
2881
2891
|
static UnwrapDirectiveSignalInputs = { name: 'ɵUnwrapDirectiveSignalInputs', moduleName: CORE };
|
|
@@ -28428,6 +28438,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
28428
28438
|
// main `for` body, use `mainSourceSpan`.
|
|
28429
28439
|
const endSpan = empty?.endSourceSpan ?? ast.endSourceSpan;
|
|
28430
28440
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, endSpan?.end ?? ast.sourceSpan.end);
|
|
28441
|
+
validateTrackByExpression(params.trackBy.expression, params.trackBy.keywordSpan, errors);
|
|
28431
28442
|
node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan, ast.i18n);
|
|
28432
28443
|
}
|
|
28433
28444
|
}
|
|
@@ -28527,6 +28538,13 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
28527
28538
|
}
|
|
28528
28539
|
return result;
|
|
28529
28540
|
}
|
|
28541
|
+
function validateTrackByExpression(expression, parseSourceSpan, errors) {
|
|
28542
|
+
const visitor = new PipeVisitor();
|
|
28543
|
+
expression.ast.visit(visitor);
|
|
28544
|
+
if (visitor.hasPipe) {
|
|
28545
|
+
errors.push(new ParseError(parseSourceSpan, 'Cannot use pipes in track expressions'));
|
|
28546
|
+
}
|
|
28547
|
+
}
|
|
28530
28548
|
/** Parses the `let` parameter of a `for` loop block. */
|
|
28531
28549
|
function parseLetParameter(sourceSpan, expression, span, loopItemName, context, errors) {
|
|
28532
28550
|
const parts = expression.split(',');
|
|
@@ -28737,6 +28755,12 @@ function stripOptionalParentheses(param, errors) {
|
|
|
28737
28755
|
}
|
|
28738
28756
|
return expression.slice(start, end);
|
|
28739
28757
|
}
|
|
28758
|
+
class PipeVisitor extends RecursiveAstVisitor {
|
|
28759
|
+
hasPipe = false;
|
|
28760
|
+
visitPipe() {
|
|
28761
|
+
this.hasPipe = true;
|
|
28762
|
+
}
|
|
28763
|
+
}
|
|
28740
28764
|
|
|
28741
28765
|
/** Pattern for a timing value in a trigger. */
|
|
28742
28766
|
const TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
@@ -32768,7 +32792,7 @@ function isAttrNode(ast) {
|
|
|
32768
32792
|
* @description
|
|
32769
32793
|
* Entry point for all public APIs of the compiler package.
|
|
32770
32794
|
*/
|
|
32771
|
-
const VERSION = new Version('20.3.
|
|
32795
|
+
const VERSION = new Version('20.3.5');
|
|
32772
32796
|
|
|
32773
32797
|
//////////////////////////////////////
|
|
32774
32798
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
@@ -33830,7 +33854,7 @@ class NodeJSPathManipulation {
|
|
|
33830
33854
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
33831
33855
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
33832
33856
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
33833
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-
|
|
33857
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-tTmeFlcz.cjs', document.baseURI).href));
|
|
33834
33858
|
// Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
|
|
33835
33859
|
const currentFileName = isCommonJS
|
|
33836
33860
|
? __filename
|
|
@@ -40224,6 +40248,120 @@ function parseFieldStringArrayValue(directive, field, evaluator) {
|
|
|
40224
40248
|
}
|
|
40225
40249
|
return value;
|
|
40226
40250
|
}
|
|
40251
|
+
/**
|
|
40252
|
+
* Returns a function that can be used to extract data for the `setClassMetadata`
|
|
40253
|
+
* calls from undecorated directive class members.
|
|
40254
|
+
*/
|
|
40255
|
+
function getDirectiveUndecoratedMetadataExtractor(reflector, importTracker) {
|
|
40256
|
+
return (member) => {
|
|
40257
|
+
const input = tryParseSignalInputMapping(member, reflector, importTracker);
|
|
40258
|
+
if (input !== null) {
|
|
40259
|
+
return getDecoratorMetaArray([
|
|
40260
|
+
[new ExternalExpr(Identifiers.inputDecorator), memberMetadataFromSignalInput(input)],
|
|
40261
|
+
]);
|
|
40262
|
+
}
|
|
40263
|
+
const output = tryParseInitializerBasedOutput(member, reflector, importTracker);
|
|
40264
|
+
if (output !== null) {
|
|
40265
|
+
return getDecoratorMetaArray([
|
|
40266
|
+
[
|
|
40267
|
+
new ExternalExpr(Identifiers.outputDecorator),
|
|
40268
|
+
memberMetadataFromInitializerOutput(output.metadata),
|
|
40269
|
+
],
|
|
40270
|
+
]);
|
|
40271
|
+
}
|
|
40272
|
+
const model = tryParseSignalModelMapping(member, reflector, importTracker);
|
|
40273
|
+
if (model !== null) {
|
|
40274
|
+
return getDecoratorMetaArray([
|
|
40275
|
+
[
|
|
40276
|
+
new ExternalExpr(Identifiers.inputDecorator),
|
|
40277
|
+
memberMetadataFromSignalInput(model.input),
|
|
40278
|
+
],
|
|
40279
|
+
[
|
|
40280
|
+
new ExternalExpr(Identifiers.outputDecorator),
|
|
40281
|
+
memberMetadataFromInitializerOutput(model.output),
|
|
40282
|
+
],
|
|
40283
|
+
]);
|
|
40284
|
+
}
|
|
40285
|
+
const query = tryParseSignalQueryFromInitializer(member, reflector, importTracker);
|
|
40286
|
+
if (query !== null) {
|
|
40287
|
+
let identifier;
|
|
40288
|
+
if (query.name === 'viewChild') {
|
|
40289
|
+
identifier = Identifiers.viewChildDecorator;
|
|
40290
|
+
}
|
|
40291
|
+
else if (query.name === 'viewChildren') {
|
|
40292
|
+
identifier = Identifiers.viewChildrenDecorator;
|
|
40293
|
+
}
|
|
40294
|
+
else if (query.name === 'contentChild') {
|
|
40295
|
+
identifier = Identifiers.contentChildDecorator;
|
|
40296
|
+
}
|
|
40297
|
+
else if (query.name === 'contentChildren') {
|
|
40298
|
+
identifier = Identifiers.contentChildrenDecorator;
|
|
40299
|
+
}
|
|
40300
|
+
else {
|
|
40301
|
+
return null;
|
|
40302
|
+
}
|
|
40303
|
+
return getDecoratorMetaArray([
|
|
40304
|
+
[new ExternalExpr(identifier), memberMetadataFromSignalQuery(query.call)],
|
|
40305
|
+
]);
|
|
40306
|
+
}
|
|
40307
|
+
return null;
|
|
40308
|
+
};
|
|
40309
|
+
}
|
|
40310
|
+
function getDecoratorMetaArray(decorators) {
|
|
40311
|
+
return new LiteralArrayExpr(decorators.map(([type, args]) => literalMap([
|
|
40312
|
+
{ key: 'type', value: type, quoted: false },
|
|
40313
|
+
{ key: 'args', value: args, quoted: false },
|
|
40314
|
+
])));
|
|
40315
|
+
}
|
|
40316
|
+
function memberMetadataFromSignalInput(input) {
|
|
40317
|
+
// Note that for signal inputs the transform is captured in the signal
|
|
40318
|
+
// initializer so we don't need to capture it here.
|
|
40319
|
+
return new LiteralArrayExpr([
|
|
40320
|
+
literalMap([
|
|
40321
|
+
{
|
|
40322
|
+
key: 'isSignal',
|
|
40323
|
+
value: literal(true),
|
|
40324
|
+
quoted: false,
|
|
40325
|
+
},
|
|
40326
|
+
{
|
|
40327
|
+
key: 'alias',
|
|
40328
|
+
value: literal(input.bindingPropertyName),
|
|
40329
|
+
quoted: false,
|
|
40330
|
+
},
|
|
40331
|
+
{
|
|
40332
|
+
key: 'required',
|
|
40333
|
+
value: literal(input.required),
|
|
40334
|
+
quoted: false,
|
|
40335
|
+
},
|
|
40336
|
+
]),
|
|
40337
|
+
]);
|
|
40338
|
+
}
|
|
40339
|
+
function memberMetadataFromInitializerOutput(output) {
|
|
40340
|
+
return new LiteralArrayExpr([literal(output.bindingPropertyName)]);
|
|
40341
|
+
}
|
|
40342
|
+
function memberMetadataFromSignalQuery(call) {
|
|
40343
|
+
const firstArg = call.arguments[0];
|
|
40344
|
+
const firstArgMeta = ts.isStringLiteralLike(firstArg) || ts.isCallExpression(firstArg)
|
|
40345
|
+
? new WrappedNodeExpr(firstArg)
|
|
40346
|
+
: // If the first argument is a class reference, we need to wrap it in a `forwardRef`
|
|
40347
|
+
// because the reference might occur after the current class. This wouldn't be flagged
|
|
40348
|
+
// on the query initializer, because it executes after the class is initialized, whereas
|
|
40349
|
+
// `setClassMetadata` runs immediately.
|
|
40350
|
+
new ExternalExpr(Identifiers.forwardRef).callFn([
|
|
40351
|
+
new ArrowFunctionExpr([], new WrappedNodeExpr(firstArg)),
|
|
40352
|
+
]);
|
|
40353
|
+
const entries = [
|
|
40354
|
+
// We use wrapped nodes here, because the output AST doesn't support spread assignments.
|
|
40355
|
+
firstArgMeta,
|
|
40356
|
+
new WrappedNodeExpr(ts.factory.createObjectLiteralExpression([
|
|
40357
|
+
...(call.arguments.length > 1
|
|
40358
|
+
? [ts.factory.createSpreadAssignment(call.arguments[1])]
|
|
40359
|
+
: []),
|
|
40360
|
+
ts.factory.createPropertyAssignment('isSignal', ts.factory.createTrue()),
|
|
40361
|
+
])),
|
|
40362
|
+
];
|
|
40363
|
+
return new LiteralArrayExpr(entries);
|
|
40364
|
+
}
|
|
40227
40365
|
function isStringArrayOrDie(value, name, node) {
|
|
40228
40366
|
if (!Array.isArray(value)) {
|
|
40229
40367
|
return false;
|
|
@@ -49500,6 +49638,9 @@ class TemplateTypeCheckerImpl {
|
|
|
49500
49638
|
const { data } = this.getLatestComponentState(directive, optimizeFor);
|
|
49501
49639
|
return data?.hostElement ?? null;
|
|
49502
49640
|
}
|
|
49641
|
+
getDirectivesOfNode(component, node) {
|
|
49642
|
+
return (this.getLatestComponentState(component).data?.boundTarget.getDirectivesOfNode(node) ?? null);
|
|
49643
|
+
}
|
|
49503
49644
|
getUsedDirectives(component) {
|
|
49504
49645
|
return this.getLatestComponentState(component).data?.boundTarget.getUsedDirectives() ?? null;
|
|
49505
49646
|
}
|
|
@@ -50975,6 +51116,7 @@ exports.getConstructorDependencies = getConstructorDependencies;
|
|
|
50975
51116
|
exports.getContainingImportDeclaration = getContainingImportDeclaration;
|
|
50976
51117
|
exports.getDefaultImportDeclaration = getDefaultImportDeclaration;
|
|
50977
51118
|
exports.getDirectiveDiagnostics = getDirectiveDiagnostics;
|
|
51119
|
+
exports.getDirectiveUndecoratedMetadataExtractor = getDirectiveUndecoratedMetadataExtractor;
|
|
50978
51120
|
exports.getFileSystem = getFileSystem;
|
|
50979
51121
|
exports.getOriginNodeForDiagnostics = getOriginNodeForDiagnostics;
|
|
50980
51122
|
exports.getProjectTsConfigPaths = getProjectTsConfigPaths;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.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-DXiKJabk.cjs');
|
|
13
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
14
14
|
var ts = require('typescript');
|
|
15
15
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
16
16
|
require('os');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
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-tTmeFlcz.cjs');
|
|
12
|
+
require('./index-BDeOF3Gn.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
16
16
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
17
17
|
var symbol = require('./symbol-VPWguRxr.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
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-tTmeFlcz.cjs');
|
|
12
|
+
require('./index-BDeOF3Gn.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
16
16
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
17
17
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.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-BlSjvHVC.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-tTmeFlcz.cjs');
|
|
13
|
+
var index$1 = require('./index-BDeOF3Gn.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-C8LDPZ5A.cjs');
|
|
17
|
+
var index = require('./index-C8BhVtUr.cjs');
|
|
18
18
|
var assert$1 = require('assert');
|
|
19
19
|
var assert = require('node:assert');
|
|
20
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
20
|
+
var apply_import_manager = require('./apply_import_manager-_3Mx7H7A.cjs');
|
|
21
21
|
require('@angular-devkit/core');
|
|
22
22
|
require('node:path/posix');
|
|
23
23
|
require('./leading_space-D9nQ8UQC.cjs');
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.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-tTmeFlcz.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
|
-
var index$1 = require('./index-
|
|
12
|
+
var index$1 = require('./index-BDeOF3Gn.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-C8LDPZ5A.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-_3Mx7H7A.cjs');
|
|
17
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-BlSjvHVC.cjs');
|
|
18
18
|
var assert = require('assert');
|
|
19
19
|
require('node:assert');
|
|
20
|
-
var index = require('./index-
|
|
20
|
+
var index = require('./index-C8BhVtUr.cjs');
|
|
21
21
|
require('@angular-devkit/core');
|
|
22
22
|
require('node:path/posix');
|
|
23
23
|
require('fs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.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-tTmeFlcz.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-BDeOF3Gn.cjs');
|
|
22
22
|
require('node:path');
|
|
23
|
-
require('./project_paths-
|
|
23
|
+
require('./project_paths-C8LDPZ5A.cjs');
|
|
24
24
|
require('node:path/posix');
|
|
25
|
-
require('./apply_import_manager-
|
|
26
|
-
require('./migrate_ts_type_references-
|
|
25
|
+
require('./apply_import_manager-_3Mx7H7A.cjs');
|
|
26
|
+
require('./migrate_ts_type_references-BlSjvHVC.cjs');
|
|
27
27
|
require('assert');
|
|
28
|
-
require('./index-
|
|
28
|
+
require('./index-C8BhVtUr.cjs');
|
|
29
29
|
require('./leading_space-D9nQ8UQC.cjs');
|
|
30
30
|
require('node:assert');
|
|
31
31
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.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-BDeOF3Gn.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-
|
|
14
|
+
var compiler_host = require('./compiler_host-DXiKJabk.cjs');
|
|
15
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
16
16
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
17
17
|
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
18
18
|
var symbol = require('./symbol-VPWguRxr.cjs');
|
|
@@ -971,7 +971,7 @@ function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, pri
|
|
|
971
971
|
}
|
|
972
972
|
node.forEachChild(walk);
|
|
973
973
|
});
|
|
974
|
-
replaceInComponentImportsArray(componentImportArrays, classesToRemove, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
974
|
+
replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
975
975
|
replaceInTestImportsArray(testArrays, removalLocations, classesToRemove, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
976
976
|
// We collect all the places where we need to remove references first before generating the
|
|
977
977
|
// removal instructions since we may have to remove multiple references from one node.
|
|
@@ -1077,12 +1077,13 @@ function collectChangeLocations(ngModule, removalLocations, componentImportArray
|
|
|
1077
1077
|
* Replaces all the leftover modules in component `imports` arrays with their exports.
|
|
1078
1078
|
* @param componentImportArrays All the imports arrays and their nodes that represent NgModules.
|
|
1079
1079
|
* @param classesToRemove Set of classes that were marked for removal.
|
|
1080
|
+
* @param removalLocations Tracks the different places from which imports should be removed.
|
|
1080
1081
|
* @param tracker
|
|
1081
1082
|
* @param typeChecker
|
|
1082
1083
|
* @param templateTypeChecker
|
|
1083
1084
|
* @param importRemapper
|
|
1084
1085
|
*/
|
|
1085
|
-
function replaceInComponentImportsArray(componentImportArrays, classesToRemove, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1086
|
+
function replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1086
1087
|
for (const [array, toReplace] of componentImportArrays.getEntries()) {
|
|
1087
1088
|
const closestClass = nodes.closestNode(array, ts.isClassDeclaration);
|
|
1088
1089
|
if (!closestClass) {
|
|
@@ -1090,16 +1091,35 @@ function replaceInComponentImportsArray(componentImportArrays, classesToRemove,
|
|
|
1090
1091
|
}
|
|
1091
1092
|
const replacements = new UniqueItemTracker();
|
|
1092
1093
|
const usedImports = new Set(findTemplateDependencies(closestClass, templateTypeChecker).map((ref) => ref.node));
|
|
1094
|
+
const nodesToRemove = new Set();
|
|
1093
1095
|
for (const node of toReplace) {
|
|
1094
1096
|
const moduleDecl = findClassDeclaration(node, typeChecker);
|
|
1095
1097
|
if (moduleDecl) {
|
|
1096
1098
|
const moduleMeta = templateTypeChecker.getNgModuleMetadata(moduleDecl);
|
|
1097
1099
|
if (moduleMeta) {
|
|
1100
|
+
let hasUsedExports = false;
|
|
1098
1101
|
moduleMeta.exports.forEach((exp) => {
|
|
1099
1102
|
if (usedImports.has(exp.node)) {
|
|
1100
1103
|
replacements.track(node, exp);
|
|
1104
|
+
hasUsedExports = true;
|
|
1101
1105
|
}
|
|
1102
1106
|
});
|
|
1107
|
+
// If none of the module's exports are used, track the node for removal
|
|
1108
|
+
if (!hasUsedExports) {
|
|
1109
|
+
nodesToRemove.add(node);
|
|
1110
|
+
}
|
|
1111
|
+
else if (ts.isIdentifier(node)) {
|
|
1112
|
+
// Track the import statement for removal when replacing with exports
|
|
1113
|
+
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
1114
|
+
const declarations = symbol?.declarations;
|
|
1115
|
+
if (declarations) {
|
|
1116
|
+
for (const declaration of declarations) {
|
|
1117
|
+
if (ts.isImportSpecifier(declaration)) {
|
|
1118
|
+
removalLocations.imports.track(declaration.parent, declaration);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1103
1123
|
}
|
|
1104
1124
|
else {
|
|
1105
1125
|
// It's unlikely not to have module metadata at this point, but just in
|
|
@@ -1108,12 +1128,13 @@ function replaceInComponentImportsArray(componentImportArrays, classesToRemove,
|
|
|
1108
1128
|
}
|
|
1109
1129
|
}
|
|
1110
1130
|
}
|
|
1111
|
-
replaceModulesInImportsArray(array, replacements, tracker, templateTypeChecker, importRemapper);
|
|
1131
|
+
replaceModulesInImportsArray(array, replacements, nodesToRemove, tracker, templateTypeChecker, importRemapper);
|
|
1112
1132
|
}
|
|
1113
1133
|
}
|
|
1114
1134
|
/**
|
|
1115
1135
|
* Replaces all the leftover modules in testing `imports` arrays with their exports.
|
|
1116
1136
|
* @param testImportArrays All test `imports` arrays and their nodes that represent modules.
|
|
1137
|
+
* @param removalLocations Tracks the different places from which imports should be removed.
|
|
1117
1138
|
* @param classesToRemove Classes marked for removal by the migration.
|
|
1118
1139
|
* @param tracker
|
|
1119
1140
|
* @param typeChecker
|
|
@@ -1123,6 +1144,7 @@ function replaceInComponentImportsArray(componentImportArrays, classesToRemove,
|
|
|
1123
1144
|
function replaceInTestImportsArray(testImportArrays, removalLocations, classesToRemove, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1124
1145
|
for (const [array, toReplace] of testImportArrays.getEntries()) {
|
|
1125
1146
|
const replacements = new UniqueItemTracker();
|
|
1147
|
+
const nodesToRemove = new Set();
|
|
1126
1148
|
for (const node of toReplace) {
|
|
1127
1149
|
const moduleDecl = findClassDeclaration(node, typeChecker);
|
|
1128
1150
|
if (moduleDecl) {
|
|
@@ -1133,6 +1155,18 @@ function replaceInTestImportsArray(testImportArrays, removalLocations, classesTo
|
|
|
1133
1155
|
const exports = moduleMeta.exports.filter((exp) => !classesToRemove.has(exp.node));
|
|
1134
1156
|
if (exports.length > 0) {
|
|
1135
1157
|
exports.forEach((exp) => replacements.track(node, exp));
|
|
1158
|
+
// Track the import statement for removal when replacing with exports
|
|
1159
|
+
if (ts.isIdentifier(node)) {
|
|
1160
|
+
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
1161
|
+
const declarations = symbol?.declarations;
|
|
1162
|
+
if (declarations) {
|
|
1163
|
+
for (const declaration of declarations) {
|
|
1164
|
+
if (ts.isImportSpecifier(declaration)) {
|
|
1165
|
+
removalLocations.imports.track(declaration.parent, declaration);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1136
1170
|
}
|
|
1137
1171
|
else {
|
|
1138
1172
|
removalLocations.arrays.track(array, node);
|
|
@@ -1145,19 +1179,21 @@ function replaceInTestImportsArray(testImportArrays, removalLocations, classesTo
|
|
|
1145
1179
|
}
|
|
1146
1180
|
}
|
|
1147
1181
|
}
|
|
1148
|
-
replaceModulesInImportsArray(array, replacements, tracker, templateTypeChecker, importRemapper);
|
|
1182
|
+
replaceModulesInImportsArray(array, replacements, nodesToRemove, tracker, templateTypeChecker, importRemapper);
|
|
1149
1183
|
}
|
|
1150
1184
|
}
|
|
1151
1185
|
/**
|
|
1152
1186
|
* Replaces any leftover modules in an `imports` arrays with a set of specified exports
|
|
1153
1187
|
* @param array Imports array which is being migrated.
|
|
1154
1188
|
* @param replacements Map of NgModule references to their exports.
|
|
1189
|
+
* @param nodesToRemove Set of nodes that should be removed without replacement (unused modules).
|
|
1155
1190
|
* @param tracker
|
|
1191
|
+
* @param typeChecker
|
|
1156
1192
|
* @param templateTypeChecker
|
|
1157
1193
|
* @param importRemapper
|
|
1158
1194
|
*/
|
|
1159
|
-
function replaceModulesInImportsArray(array, replacements, tracker, templateTypeChecker, importRemapper) {
|
|
1160
|
-
if (replacements.isEmpty()) {
|
|
1195
|
+
function replaceModulesInImportsArray(array, replacements, nodesToRemove, tracker, templateTypeChecker, importRemapper) {
|
|
1196
|
+
if (replacements.isEmpty() && nodesToRemove.size === 0) {
|
|
1161
1197
|
return;
|
|
1162
1198
|
}
|
|
1163
1199
|
const newElements = [];
|
|
@@ -1168,6 +1204,10 @@ function replaceModulesInImportsArray(array, replacements, tracker, templateType
|
|
|
1168
1204
|
}
|
|
1169
1205
|
}
|
|
1170
1206
|
for (const element of array.elements) {
|
|
1207
|
+
// Check if this element should be removed entirely (unused module)
|
|
1208
|
+
if (nodesToRemove.has(element)) {
|
|
1209
|
+
continue;
|
|
1210
|
+
}
|
|
1171
1211
|
const replacementRefs = replacements.get(element);
|
|
1172
1212
|
if (!replacementRefs) {
|
|
1173
1213
|
newElements.push(element);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
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-tTmeFlcz.cjs');
|
|
12
|
+
require('./index-BDeOF3Gn.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
16
16
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
17
17
|
var symbol = require('./symbol-VPWguRxr.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
package/testing/index.d.ts
CHANGED
package/weak_ref.d.d.ts
CHANGED