@angular/core 19.2.4 → 19.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/{event_dispatcher.d-pVP0-wST.d.ts → event_dispatcher.d-DlbccpYq.d.ts} +3 -2
- package/fesm2022/core.mjs +103 -88
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +3 -3
- package/fesm2022/rxjs-interop.mjs +4 -3
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +148 -97
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/{untracked-CS7WUAzb.mjs → untracked-BKcld_ew.mjs} +3 -3
- package/fesm2022/{untracked-CS7WUAzb.mjs.map → untracked-BKcld_ew.mjs.map} +1 -1
- package/index.d.ts +23 -7
- package/{navigation_types.d-DgDrF5rp.d.ts → navigation_types.d-fAxd92YV.d.ts} +3 -2
- package/package.json +1 -1
- package/primitives/di/index.d.ts +3 -2
- package/primitives/event-dispatch/index.d.ts +3 -3
- package/primitives/signals/index.d.ts +5 -4
- package/rxjs-interop/index.d.ts +4 -3
- package/schematics/bundles/{apply_import_manager-BynuozbO.js → apply_import_manager-DFADpdFu.js} +3 -3
- package/schematics/bundles/{checker-DP-zos5Q.js → checker-DoX_7XCa.js} +20 -13
- package/schematics/bundles/cleanup-unused-imports.js +42 -64
- package/schematics/bundles/{compiler_host-DzM2hemp.js → compiler_host-BUKEE1cA.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +3 -3
- package/schematics/bundles/imports-CIX-JgAN.js +1 -1
- package/schematics/bundles/{program-BmLi-Vxz.js → index-B4b0V0Vo.js} +52 -26
- package/schematics/bundles/{index-CPpyW--c.js → index-CpZKzrqM.js} +6 -6
- package/schematics/bundles/inject-migration.js +25 -8
- package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-Ri-K4P_1.js → migrate_ts_type_references-DQVDid4G.js} +5 -5
- package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
- package/schematics/bundles/nodes-B16H9JUd.js +1 -1
- package/schematics/bundles/output-migration.js +115 -81
- package/schematics/bundles/pending-tasks.js +3 -3
- package/schematics/bundles/{project_paths-CXXqWSoY.js → project_paths-C3etOlgT.js} +88 -13
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
- package/schematics/bundles/provide-initializer.js +3 -3
- package/schematics/bundles/route-lazy-loading.js +3 -3
- package/schematics/bundles/self-closing-tags-migration.js +39 -64
- package/schematics/bundles/signal-input-migration.js +64 -87
- package/schematics/bundles/signal-queries-migration.js +82 -93
- package/schematics/bundles/signals.js +11 -11
- package/schematics/bundles/standalone-migration.js +5 -6
- package/testing/index.d.ts +7 -22
- package/{weak_ref.d-Bp6cSy-X.d.ts → weak_ref.d-DWHPG08n.d.ts} +3 -2
- package/schematics/bundles/index-BPqwMr5d.js +0 -30
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1291,14 +1291,13 @@ class TemplateLiteralElementExpr extends Expression {
|
|
|
1291
1291
|
constructor(text, sourceSpan, rawText) {
|
|
1292
1292
|
super(STRING_TYPE, sourceSpan);
|
|
1293
1293
|
this.text = text;
|
|
1294
|
-
// If `rawText` is not provided,
|
|
1295
|
-
// associated `sourceSpan`. If that is also not available, "fake" the raw
|
|
1296
|
-
// string instead by escaping the following control sequences:
|
|
1294
|
+
// If `rawText` is not provided, "fake" the raw string by escaping the following sequences:
|
|
1297
1295
|
// - "\" would otherwise indicate that the next character is a control character.
|
|
1298
1296
|
// - "`" and "${" are template string control sequences that would otherwise prematurely
|
|
1299
1297
|
// indicate the end of the template literal element.
|
|
1300
|
-
|
|
1301
|
-
|
|
1298
|
+
// Note that we can't rely on the `sourceSpan` here, because it may be incorrect (see
|
|
1299
|
+
// https://github.com/angular/angular/pull/60267#discussion_r1986402524).
|
|
1300
|
+
this.rawText = rawText ?? escapeForTemplateLiteral(escapeSlashes(text));
|
|
1302
1301
|
}
|
|
1303
1302
|
visitExpression(visitor, context) {
|
|
1304
1303
|
return visitor.visitTemplateLiteralElementExpr(this, context);
|
|
@@ -15974,7 +15973,7 @@ class _Tokenizer {
|
|
|
15974
15973
|
else {
|
|
15975
15974
|
const name = this._cursor.getChars(nameStart);
|
|
15976
15975
|
this._cursor.advance();
|
|
15977
|
-
const char = NAMED_ENTITIES[name];
|
|
15976
|
+
const char = NAMED_ENTITIES.hasOwnProperty(name) && NAMED_ENTITIES[name];
|
|
15978
15977
|
if (!char) {
|
|
15979
15978
|
throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));
|
|
15980
15979
|
}
|
|
@@ -27094,11 +27093,13 @@ const FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
|
27094
27093
|
/** Pattern for the tracking expression in a for loop block. */
|
|
27095
27094
|
const FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
27096
27095
|
/** Pattern for the `as` expression in a conditional block. */
|
|
27097
|
-
const CONDITIONAL_ALIAS_PATTERN = /^(as\s)
|
|
27096
|
+
const CONDITIONAL_ALIAS_PATTERN = /^(as\s+)(.*)/;
|
|
27098
27097
|
/** Pattern used to identify an `else if` block. */
|
|
27099
27098
|
const ELSE_IF_PATTERN = /^else[^\S\r\n]+if/;
|
|
27100
27099
|
/** Pattern used to identify a `let` parameter. */
|
|
27101
27100
|
const FOR_LOOP_LET_PATTERN = /^let\s+([\S\s]*)/;
|
|
27101
|
+
/** Pattern used to validate a JavaScript identifier. */
|
|
27102
|
+
const IDENTIFIER_PATTERN = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
27102
27103
|
/**
|
|
27103
27104
|
* Pattern to group a string into leading whitespace, non whitespace, and trailing whitespace.
|
|
27104
27105
|
* Useful for getting the variable name span when a span can contain leading and trailing space.
|
|
@@ -27446,9 +27447,14 @@ function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
|
27446
27447
|
}
|
|
27447
27448
|
else {
|
|
27448
27449
|
const name = aliasMatch[2].trim();
|
|
27449
|
-
|
|
27450
|
-
|
|
27451
|
-
|
|
27450
|
+
if (IDENTIFIER_PATTERN.test(name)) {
|
|
27451
|
+
const variableStart = param.sourceSpan.start.moveBy(aliasMatch[1].length);
|
|
27452
|
+
const variableSpan = new ParseSourceSpan(variableStart, variableStart.moveBy(name.length));
|
|
27453
|
+
expressionAlias = new Variable(name, name, variableSpan, variableSpan);
|
|
27454
|
+
}
|
|
27455
|
+
else {
|
|
27456
|
+
errors.push(new ParseError(param.sourceSpan, '"as" expression must be a valid JavaScript identifier'));
|
|
27457
|
+
}
|
|
27452
27458
|
}
|
|
27453
27459
|
}
|
|
27454
27460
|
return { expression, expressionAlias };
|
|
@@ -30721,7 +30727,7 @@ function publishFacade(global) {
|
|
|
30721
30727
|
* @description
|
|
30722
30728
|
* Entry point for all public APIs of the compiler package.
|
|
30723
30729
|
*/
|
|
30724
|
-
new Version('19.2.
|
|
30730
|
+
new Version('19.2.6');
|
|
30725
30731
|
|
|
30726
30732
|
const _I18N_ATTR = 'i18n';
|
|
30727
30733
|
const _I18N_ATTR_PREFIX = 'i18n-';
|
|
@@ -31238,6 +31244,7 @@ exports.ErrorCode = void 0;
|
|
|
31238
31244
|
ErrorCode[ErrorCode["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
|
|
31239
31245
|
ErrorCode[ErrorCode["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
|
|
31240
31246
|
ErrorCode[ErrorCode["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
|
|
31247
|
+
ErrorCode[ErrorCode["DUPLICATE_DECORATED_PROPERTIES"] = 1012] = "DUPLICATE_DECORATED_PROPERTIES";
|
|
31241
31248
|
/**
|
|
31242
31249
|
* Raised when an initializer API is annotated with an unexpected decorator.
|
|
31243
31250
|
*
|
|
@@ -32147,7 +32154,7 @@ class NodeJSPathManipulation {
|
|
|
32147
32154
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
32148
32155
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
32149
32156
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
32150
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('checker-
|
|
32157
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('checker-DoX_7XCa.js', document.baseURI).href));
|
|
32151
32158
|
const currentFileName = isCommonJS ? __filename : url.fileURLToPath(currentFileUrl);
|
|
32152
32159
|
/**
|
|
32153
32160
|
* A wrapper around the Node.js file-system that supports readonly operations and path manipulation.
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var schematics = require('@angular-devkit/schematics');
|
|
10
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.js');
|
|
11
|
-
var project_paths = require('./project_paths-CXXqWSoY.js');
|
|
12
|
-
require('os');
|
|
13
|
-
var ts = require('typescript');
|
|
14
|
-
var checker = require('./checker-DP-zos5Q.js');
|
|
15
|
-
var program = require('./program-BmLi-Vxz.js');
|
|
16
|
-
require('path');
|
|
17
|
-
require('./index-BPqwMr5d.js');
|
|
18
|
-
var apply_import_manager = require('./apply_import_manager-BynuozbO.js');
|
|
19
9
|
require('@angular-devkit/core');
|
|
20
10
|
require('node:path/posix');
|
|
11
|
+
var project_paths = require('./project_paths-C3etOlgT.js');
|
|
12
|
+
var ts = require('typescript');
|
|
13
|
+
require('os');
|
|
14
|
+
var checker = require('./checker-DoX_7XCa.js');
|
|
15
|
+
var index = require('./index-B4b0V0Vo.js');
|
|
16
|
+
require('path');
|
|
17
|
+
var apply_import_manager = require('./apply_import_manager-DFADpdFu.js');
|
|
18
|
+
require('@angular-devkit/schematics');
|
|
19
|
+
require('./project_tsconfig_paths-CDVxT6Ov.js');
|
|
21
20
|
require('fs');
|
|
22
21
|
require('module');
|
|
23
22
|
require('url');
|
|
@@ -30,7 +29,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
30
29
|
extendedDiagnostics: {
|
|
31
30
|
checks: {
|
|
32
31
|
// Ensure that the diagnostic is enabled.
|
|
33
|
-
unusedStandaloneImports:
|
|
32
|
+
unusedStandaloneImports: index.DiagnosticCategoryLabel.Warning,
|
|
34
33
|
},
|
|
35
34
|
},
|
|
36
35
|
});
|
|
@@ -264,59 +263,38 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
264
263
|
|
|
265
264
|
function migrate() {
|
|
266
265
|
return async (tree, context) => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
266
|
+
await project_paths.runMigrationInDevkit({
|
|
267
|
+
getMigration: () => new UnusedImportsMigration(),
|
|
268
|
+
tree,
|
|
269
|
+
beforeProgramCreation: (tsconfigPath, stage) => {
|
|
270
|
+
if (stage === project_paths.MigrationStage.Analysis) {
|
|
271
|
+
context.logger.info(`Preparing analysis for: ${tsconfigPath}...`);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
context.logger.info(`Running migration for: ${tsconfigPath}...`);
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
beforeUnitAnalysis: (tsconfigPath) => {
|
|
278
|
+
context.logger.info(`Scanning for unused imports using ${tsconfigPath}`);
|
|
279
|
+
},
|
|
280
|
+
afterAnalysisFailure: () => {
|
|
281
|
+
context.logger.error('Schematic failed unexpectedly with no analysis data');
|
|
282
|
+
},
|
|
283
|
+
whenDone: (stats) => {
|
|
284
|
+
const { removedImports, changedFiles } = stats.counters;
|
|
285
|
+
let statsMessage;
|
|
286
|
+
if (removedImports === 0) {
|
|
287
|
+
statsMessage = 'Schematic could not find unused imports in the project';
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
statsMessage =
|
|
291
|
+
`Removed ${removedImports} import${removedImports !== 1 ? 's' : ''} ` +
|
|
292
|
+
`in ${changedFiles} file${changedFiles !== 1 ? 's' : ''}`;
|
|
293
|
+
}
|
|
294
|
+
context.logger.info('');
|
|
295
|
+
context.logger.info(statsMessage);
|
|
296
|
+
},
|
|
280
297
|
});
|
|
281
|
-
for (const { info, tsconfigPath } of programInfos) {
|
|
282
|
-
context.logger.info(`Scanning for unused imports using ${tsconfigPath}`);
|
|
283
|
-
unitResults.push(await migration.analyze(info));
|
|
284
|
-
}
|
|
285
|
-
const combined = await project_paths.synchronouslyCombineUnitData(migration, unitResults);
|
|
286
|
-
if (combined === null) {
|
|
287
|
-
context.logger.error('Schematic failed unexpectedly with no analysis data');
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const globalMeta = await migration.globalMeta(combined);
|
|
291
|
-
const replacementsPerFile = new Map();
|
|
292
|
-
const { replacements } = await migration.migrate(globalMeta);
|
|
293
|
-
const changesPerFile = project_paths.groupReplacementsByFile(replacements);
|
|
294
|
-
for (const [file, changes] of changesPerFile) {
|
|
295
|
-
if (!replacementsPerFile.has(file)) {
|
|
296
|
-
replacementsPerFile.set(file, changes);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
for (const [file, changes] of replacementsPerFile) {
|
|
300
|
-
const recorder = tree.beginUpdate(file);
|
|
301
|
-
for (const c of changes) {
|
|
302
|
-
recorder
|
|
303
|
-
.remove(c.data.position, c.data.end - c.data.position)
|
|
304
|
-
.insertRight(c.data.position, c.data.toInsert);
|
|
305
|
-
}
|
|
306
|
-
tree.commitUpdate(recorder);
|
|
307
|
-
}
|
|
308
|
-
const { counters: { removedImports, changedFiles }, } = await migration.stats(globalMeta);
|
|
309
|
-
let statsMessage;
|
|
310
|
-
if (removedImports === 0) {
|
|
311
|
-
statsMessage = 'Schematic could not find unused imports in the project';
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
statsMessage =
|
|
315
|
-
`Removed ${removedImports} import${removedImports !== 1 ? 's' : ''} ` +
|
|
316
|
-
`in ${changedFiles} file${changedFiles !== 1 ? 's' : ''}`;
|
|
317
|
-
}
|
|
318
|
-
context.logger.info('');
|
|
319
|
-
context.logger.info(statsMessage);
|
|
320
298
|
};
|
|
321
299
|
}
|
|
322
300
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
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 ts = require('typescript');
|
|
10
|
-
var checker = require('./checker-
|
|
10
|
+
var checker = require('./checker-DoX_7XCa.js');
|
|
11
11
|
require('os');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
-
var checker = require('./checker-
|
|
11
|
+
var compiler_host = require('./compiler_host-BUKEE1cA.js');
|
|
12
|
+
var checker = require('./checker-DoX_7XCa.js');
|
|
13
13
|
var ts = require('typescript');
|
|
14
14
|
require('os');
|
|
15
15
|
require('fs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
11
|
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.js');
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
+
var compiler_host = require('./compiler_host-BUKEE1cA.js');
|
|
13
13
|
var ts = require('typescript');
|
|
14
14
|
var imports = require('./imports-CIX-JgAN.js');
|
|
15
15
|
require('@angular-devkit/core');
|
|
16
|
-
require('./checker-
|
|
16
|
+
require('./checker-DoX_7XCa.js');
|
|
17
17
|
require('os');
|
|
18
18
|
require('fs');
|
|
19
19
|
require('module');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var checker = require('./checker-
|
|
9
|
+
var checker = require('./checker-DoX_7XCa.js');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
var p = require('path');
|
|
12
12
|
require('os');
|
|
@@ -1007,7 +1007,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
1007
1007
|
function compileDeclareClassMetadata(metadata) {
|
|
1008
1008
|
const definitionMap = new checker.DefinitionMap();
|
|
1009
1009
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
1010
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1010
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1011
1011
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1012
1012
|
definitionMap.set('type', metadata.type);
|
|
1013
1013
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -1025,7 +1025,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
1025
1025
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
|
|
1026
1026
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
|
|
1027
1027
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
1028
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1028
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1029
1029
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1030
1030
|
definitionMap.set('type', metadata.type);
|
|
1031
1031
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -1120,7 +1120,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
1120
1120
|
const definitionMap = new checker.DefinitionMap();
|
|
1121
1121
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
1122
1122
|
definitionMap.set('minVersion', checker.literal(minVersion));
|
|
1123
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1123
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1124
1124
|
// e.g. `type: MyDirective`
|
|
1125
1125
|
definitionMap.set('type', meta.type.value);
|
|
1126
1126
|
if (meta.isStandalone !== undefined) {
|
|
@@ -1536,7 +1536,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1536
1536
|
function compileDeclareFactoryFunction(meta) {
|
|
1537
1537
|
const definitionMap = new checker.DefinitionMap();
|
|
1538
1538
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1539
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1539
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1540
1540
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1541
1541
|
definitionMap.set('type', meta.type.value);
|
|
1542
1542
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1571,7 +1571,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1571
1571
|
function createInjectableDefinitionMap(meta) {
|
|
1572
1572
|
const definitionMap = new checker.DefinitionMap();
|
|
1573
1573
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1574
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1574
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1575
1575
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1576
1576
|
definitionMap.set('type', meta.type.value);
|
|
1577
1577
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1622,7 +1622,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1622
1622
|
function createInjectorDefinitionMap(meta) {
|
|
1623
1623
|
const definitionMap = new checker.DefinitionMap();
|
|
1624
1624
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1625
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1625
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1626
1626
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1627
1627
|
definitionMap.set('type', meta.type.value);
|
|
1628
1628
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1655,7 +1655,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1655
1655
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1656
1656
|
}
|
|
1657
1657
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1658
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1658
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1659
1659
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1660
1660
|
definitionMap.set('type', meta.type.value);
|
|
1661
1661
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1706,7 +1706,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1706
1706
|
function createPipeDefinitionMap(meta) {
|
|
1707
1707
|
const definitionMap = new checker.DefinitionMap();
|
|
1708
1708
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1709
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1709
|
+
definitionMap.set('version', checker.literal('19.2.6'));
|
|
1710
1710
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1711
1711
|
// e.g. `type: MyPipe`
|
|
1712
1712
|
definitionMap.set('type', meta.type.value);
|
|
@@ -4512,15 +4512,13 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
|
|
|
4512
4512
|
const classMembers = reflection
|
|
4513
4513
|
.getMembersOfClass(clazz)
|
|
4514
4514
|
.filter((member) => !member.isStatic && member.decorators !== null && member.decorators.length > 0);
|
|
4515
|
-
const
|
|
4516
|
-
|
|
4517
|
-
.filter((name, i, arr) => arr.indexOf(name) < i);
|
|
4518
|
-
if (duplicateDecoratedMemberNames.length > 0) {
|
|
4515
|
+
const duplicateDecoratedMembers = classMembers.filter((member, i, arr) => arr.findIndex((arrayMember) => arrayMember.name === member.name) < i);
|
|
4516
|
+
if (duplicateDecoratedMembers.length > 0) {
|
|
4519
4517
|
// This should theoretically never happen, because the only way to have duplicate instance
|
|
4520
4518
|
// member names is getter/setter pairs and decorators cannot appear in both a getter and the
|
|
4521
4519
|
// corresponding setter.
|
|
4522
|
-
throw new
|
|
4523
|
-
|
|
4520
|
+
throw new checker.FatalDiagnosticError(checker.ErrorCode.DUPLICATE_DECORATED_PROPERTIES, duplicateDecoratedMembers[0].nameNode ?? clazz, `Duplicate decorated properties found on class '${clazz.name.text}': ` +
|
|
4521
|
+
duplicateDecoratedMembers.map((member) => member.name).join(', '));
|
|
4524
4522
|
}
|
|
4525
4523
|
const decoratedMembers = classMembers.map((member) => classMemberToMetadata(member.nameNode ?? member.name, member.decorators, isCore));
|
|
4526
4524
|
if (decoratedMembers.length > 0) {
|
|
@@ -9477,18 +9475,23 @@ class ComponentDecoratorHandler {
|
|
|
9477
9475
|
diagnostics.push(diagnostic);
|
|
9478
9476
|
}
|
|
9479
9477
|
}
|
|
9480
|
-
// Set up the R3TargetBinder
|
|
9481
|
-
// later fed to the TemplateDefinitionBuilder.
|
|
9478
|
+
// Set up the R3TargetBinder.
|
|
9482
9479
|
const binder = createTargetBinder(dependencies);
|
|
9483
|
-
const pipes = extractPipes(dependencies);
|
|
9484
9480
|
let allDependencies = dependencies;
|
|
9485
9481
|
let deferBlockBinder = binder;
|
|
9486
9482
|
// If there are any explicitly deferred dependencies (via `@Component.deferredImports`),
|
|
9487
|
-
// re-compute the list of dependencies and create a new binder for defer blocks.
|
|
9483
|
+
// re-compute the list of dependencies and create a new binder for defer blocks. This
|
|
9484
|
+
// is because we have deferred dependencies that are not in the standard imports list
|
|
9485
|
+
// and need to be referenced later when determining what dependencies need to be in a
|
|
9486
|
+
// defer function / instruction call. Otherwise they end up treated as a standard
|
|
9487
|
+
// import, which is wrong.
|
|
9488
9488
|
if (explicitlyDeferredDependencies.length > 0) {
|
|
9489
9489
|
allDependencies = [...explicitlyDeferredDependencies, ...dependencies];
|
|
9490
9490
|
deferBlockBinder = createTargetBinder(allDependencies);
|
|
9491
9491
|
}
|
|
9492
|
+
// Set up the pipes map that is later used to determine which dependencies are used in
|
|
9493
|
+
// the template.
|
|
9494
|
+
const pipes = extractPipes(allDependencies);
|
|
9492
9495
|
// Next, the component template AST is bound using the R3TargetBinder. This produces a
|
|
9493
9496
|
// BoundTarget, which is similar to a ts.TypeChecker.
|
|
9494
9497
|
const bound = binder.bind({ template: metadata.template.nodes });
|
|
@@ -9531,10 +9534,10 @@ class ComponentDecoratorHandler {
|
|
|
9531
9534
|
// including all defer blocks.
|
|
9532
9535
|
const wholeTemplateUsed = new Set(eagerlyUsed);
|
|
9533
9536
|
for (const bound of deferBlocks.values()) {
|
|
9534
|
-
for (const dir of bound.
|
|
9537
|
+
for (const dir of bound.getUsedDirectives()) {
|
|
9535
9538
|
wholeTemplateUsed.add(dir.ref.node);
|
|
9536
9539
|
}
|
|
9537
|
-
for (const name of bound.
|
|
9540
|
+
for (const name of bound.getUsedPipes()) {
|
|
9538
9541
|
if (!pipes.has(name)) {
|
|
9539
9542
|
continue;
|
|
9540
9543
|
}
|
|
@@ -10720,6 +10723,13 @@ class PipeDecoratorHandler {
|
|
|
10720
10723
|
}
|
|
10721
10724
|
}
|
|
10722
10725
|
|
|
10726
|
+
/**
|
|
10727
|
+
* @module
|
|
10728
|
+
* @description
|
|
10729
|
+
* Entry point for all public APIs of the compiler-cli package.
|
|
10730
|
+
*/
|
|
10731
|
+
new checker.Version('19.2.6');
|
|
10732
|
+
|
|
10723
10733
|
/**
|
|
10724
10734
|
* Whether a given decorator should be treated as an Angular decorator.
|
|
10725
10735
|
* Either it's used in @angular/core, or it's imported from there.
|
|
@@ -18552,7 +18562,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
18552
18562
|
* @param minVersion Minimum required version for the feature.
|
|
18553
18563
|
*/
|
|
18554
18564
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
18555
|
-
// A version of `19.2.
|
|
18565
|
+
// A version of `19.2.6` usually means that core is at head so it supports
|
|
18556
18566
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
18557
18567
|
// with the current version during build time.
|
|
18558
18568
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -19099,7 +19109,14 @@ class NgCompiler {
|
|
|
19099
19109
|
const printer = ts.createPrinter();
|
|
19100
19110
|
const nodeText = printer.printNode(ts.EmitHint.Unspecified, callback, sourceFile);
|
|
19101
19111
|
return ts.transpileModule(nodeText, {
|
|
19102
|
-
compilerOptions:
|
|
19112
|
+
compilerOptions: {
|
|
19113
|
+
...this.options,
|
|
19114
|
+
// Some module types can produce additional code (see #60795) whereas we need the
|
|
19115
|
+
// HMR update module to use a native `export`. Override the `target` and `module`
|
|
19116
|
+
// to ensure that it looks as expected.
|
|
19117
|
+
module: ts.ModuleKind.ES2022,
|
|
19118
|
+
target: ts.ScriptTarget.ES2022,
|
|
19119
|
+
},
|
|
19103
19120
|
fileName: sourceFile.fileName,
|
|
19104
19121
|
reportDiagnostics: false,
|
|
19105
19122
|
}).outputText;
|
|
@@ -19373,8 +19390,7 @@ class NgCompiler {
|
|
|
19373
19390
|
// namespace" and the logic of `LogicalProjectStrategy` is required to generate correct
|
|
19374
19391
|
// imports which may cross these multiple directories. Otherwise, plain relative imports are
|
|
19375
19392
|
// sufficient.
|
|
19376
|
-
if (this.options.
|
|
19377
|
-
(this.options.rootDirs !== undefined && this.options.rootDirs.length > 0)) {
|
|
19393
|
+
if (this.options.rootDirs !== undefined && this.options.rootDirs.length > 0) {
|
|
19378
19394
|
// rootDirs logic is in effect - use the `LogicalProjectStrategy` for in-project relative
|
|
19379
19395
|
// imports.
|
|
19380
19396
|
localImportStrategy = new checker.LogicalProjectStrategy(reflector, new checker.LogicalFileSystem([...this.adapter.rootDirs], this.adapter));
|
|
@@ -20247,6 +20263,16 @@ function mergeEmitResults(emitResults) {
|
|
|
20247
20263
|
return { diagnostics, emitSkipped, emittedFiles };
|
|
20248
20264
|
}
|
|
20249
20265
|
|
|
20266
|
+
var LogLevel;
|
|
20267
|
+
(function (LogLevel) {
|
|
20268
|
+
LogLevel[LogLevel["debug"] = 0] = "debug";
|
|
20269
|
+
LogLevel[LogLevel["info"] = 1] = "info";
|
|
20270
|
+
LogLevel[LogLevel["warn"] = 2] = "warn";
|
|
20271
|
+
LogLevel[LogLevel["error"] = 3] = "error";
|
|
20272
|
+
})(LogLevel || (LogLevel = {}));
|
|
20273
|
+
|
|
20274
|
+
checker.setFileSystem(new checker.NodeJSFileSystem());
|
|
20275
|
+
|
|
20250
20276
|
exports.DtsMetadataReader = DtsMetadataReader;
|
|
20251
20277
|
exports.NgtscProgram = NgtscProgram;
|
|
20252
20278
|
exports.PartialEvaluator = PartialEvaluator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var
|
|
11
|
+
var checker = require('./checker-DoX_7XCa.js');
|
|
12
|
+
var index = require('./index-B4b0V0Vo.js');
|
|
13
13
|
require('path');
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-C3etOlgT.js');
|
|
15
15
|
|
|
16
16
|
function getMemberName(member) {
|
|
17
17
|
if (member.name === undefined) {
|
|
@@ -628,7 +628,7 @@ function identifyHostBindingReferences(node, programInfo, checker$1, reflector,
|
|
|
628
628
|
*/
|
|
629
629
|
function attemptExtractTemplateDefinition(node, checker$1, reflector, resourceLoader) {
|
|
630
630
|
const classDecorators = reflector.getDecoratorsOfDeclaration(node);
|
|
631
|
-
const evaluator = new
|
|
631
|
+
const evaluator = new index.PartialEvaluator(reflector, checker$1, null);
|
|
632
632
|
const ngDecorators = classDecorators !== null
|
|
633
633
|
? checker.getAngularDecorators(classDecorators, ['Component'], /* isAngularCore */ false)
|
|
634
634
|
: [];
|
|
@@ -738,7 +738,7 @@ function extractTemplateWithoutCompilerAnalysis(node, checker$1, reflector, reso
|
|
|
738
738
|
if (tmplDef === null) {
|
|
739
739
|
return null;
|
|
740
740
|
}
|
|
741
|
-
return
|
|
741
|
+
return index.extractTemplate(node, tmplDef, evaluator, null, resourceLoader, {
|
|
742
742
|
enableBlockSyntax: true,
|
|
743
743
|
enableLetSyntax: true,
|
|
744
744
|
usePoisonedData: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.6
|
|
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 schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var compiler_host = require('./compiler_host-
|
|
11
|
+
var compiler_host = require('./compiler_host-BUKEE1cA.js');
|
|
12
12
|
var ts = require('typescript');
|
|
13
13
|
var ng_decorators = require('./ng_decorators-DznZ5jMl.js');
|
|
14
14
|
var imports = require('./imports-CIX-JgAN.js');
|
|
15
15
|
var nodes = require('./nodes-B16H9JUd.js');
|
|
16
16
|
var leading_space = require('./leading_space-D9nQ8UQC.js');
|
|
17
|
-
require('./checker-
|
|
17
|
+
require('./checker-DoX_7XCa.js');
|
|
18
18
|
require('os');
|
|
19
19
|
require('fs');
|
|
20
20
|
require('module');
|
|
@@ -235,9 +235,20 @@ function getSuperParameters(declaration, superCall, localTypeChecker) {
|
|
|
235
235
|
if (ts.isParameter(decl) && topLevelParameters.has(decl)) {
|
|
236
236
|
usedParams.add(decl);
|
|
237
237
|
}
|
|
238
|
+
else if (ts.isShorthandPropertyAssignment(decl) &&
|
|
239
|
+
topLevelParameterNames.has(decl.name.text)) {
|
|
240
|
+
for (const param of topLevelParameters) {
|
|
241
|
+
if (ts.isIdentifier(param.name) && decl.name.text === param.name.text) {
|
|
242
|
+
usedParams.add(param);
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
238
247
|
});
|
|
248
|
+
// Parameters referenced inside callbacks can be used directly
|
|
249
|
+
// within `super` so don't descend into inline functions.
|
|
239
250
|
}
|
|
240
|
-
else {
|
|
251
|
+
else if (!isInlineFunction(node)) {
|
|
241
252
|
node.forEachChild(walk);
|
|
242
253
|
}
|
|
243
254
|
});
|
|
@@ -329,6 +340,10 @@ function findSuperCall(root) {
|
|
|
329
340
|
});
|
|
330
341
|
return result;
|
|
331
342
|
}
|
|
343
|
+
/** Checks whether a node is an inline function. */
|
|
344
|
+
function isInlineFunction(node) {
|
|
345
|
+
return (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node));
|
|
346
|
+
}
|
|
332
347
|
|
|
333
348
|
/*!
|
|
334
349
|
* @license
|
|
@@ -573,9 +588,7 @@ function isInsideInlineFunction(startNode, boundary) {
|
|
|
573
588
|
if (current === boundary) {
|
|
574
589
|
return false;
|
|
575
590
|
}
|
|
576
|
-
if (
|
|
577
|
-
ts.isFunctionExpression(current) ||
|
|
578
|
-
ts.isArrowFunction(current)) {
|
|
591
|
+
if (isInlineFunction(current)) {
|
|
579
592
|
return true;
|
|
580
593
|
}
|
|
581
594
|
current = current.parent;
|
|
@@ -1098,16 +1111,20 @@ function applyInternalOnlyChanges(node, constructor, localTypeChecker, tracker,
|
|
|
1098
1111
|
}
|
|
1099
1112
|
result.toCombine.forEach(({ declaration, initializer }) => {
|
|
1100
1113
|
const initializerStatement = nodes.closestNode(initializer, ts.isStatement);
|
|
1101
|
-
const newProperty = ts.factory.createPropertyDeclaration(cloneModifiers(declaration.modifiers), cloneName(declaration.name), declaration.questionToken, declaration.type, initializer);
|
|
1102
1114
|
// If the initialization order is being preserved, we have to remove the original
|
|
1103
1115
|
// declaration and re-declare it. Otherwise we can do the replacement in-place.
|
|
1104
1116
|
if (preserveInitOrder) {
|
|
1117
|
+
// Preserve comment in the new property since we are removing the entire node.
|
|
1118
|
+
const newProperty = ts.factory.createPropertyDeclaration(declaration.modifiers, declaration.name, declaration.questionToken, declaration.type, initializer);
|
|
1105
1119
|
tracker.removeNode(declaration, true);
|
|
1106
1120
|
removedMembers.add(declaration);
|
|
1107
1121
|
afterInjectCalls.push(memberIndentation +
|
|
1108
1122
|
printer.printNode(ts.EmitHint.Unspecified, newProperty, declaration.getSourceFile()));
|
|
1109
1123
|
}
|
|
1110
1124
|
else {
|
|
1125
|
+
// Strip comments from the declaration since we are replacing just
|
|
1126
|
+
// the node, not the leading comment.
|
|
1127
|
+
const newProperty = ts.factory.createPropertyDeclaration(cloneModifiers(declaration.modifiers), cloneName(declaration.name), declaration.questionToken, declaration.type, initializer);
|
|
1111
1128
|
tracker.replaceNode(declaration, newProperty);
|
|
1112
1129
|
}
|
|
1113
1130
|
// This should always be defined, but null check it just in case.
|