@angular/core 19.2.14 → 19.2.16
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-K56StcHr.d.ts +1 -1
- package/fesm2022/core.mjs +32 -23
- package/fesm2022/core.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 +1 -1
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/untracked-BKcld_ew.mjs +1 -1
- package/fesm2022/untracked-BKcld_ew.mjs.map +1 -1
- package/index.d.ts +7 -8
- package/navigation_types.d-fAxd92YV.d.ts +1 -1
- package/package.json +1 -1
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +127 -0
- package/schematics/bundles/apply_import_manager-DF0BUe6N.cjs +1 -1
- package/schematics/bundles/{compiler_host-C55Cczah.cjs → change_tracker-BfH3nBIf.cjs} +1 -120
- package/schematics/bundles/checker-BwV9MjSQ.cjs +2 -2
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/compiler_host-CAfDJO3W.cjs +129 -0
- package/schematics/bundles/control-flow-migration.cjs +4 -3
- package/schematics/bundles/explicit-standalone-flag.cjs +4 -3
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/index-B6p5mHIY.cjs +1 -1
- package/schematics/bundles/index-BnJH1Hc7.cjs +11 -11
- package/schematics/bundles/inject-migration.cjs +5 -4
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-DQe6JtwN.cjs +1 -1
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/pending-tasks.cjs +4 -3
- package/schematics/bundles/project_paths-DY3SIODd.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/provide-initializer.cjs +4 -3
- package/schematics/bundles/route-lazy-loading.cjs +5 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +8 -7
- package/schematics/migrations.json +5 -0
- package/testing/index.d.ts +1 -1
- package/weak_ref.d-DWHPG08n.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,26 +9,6 @@
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
var checker = require('./checker-BwV9MjSQ.cjs');
|
|
11
11
|
require('os');
|
|
12
|
-
var p = require('path');
|
|
13
|
-
|
|
14
|
-
function _interopNamespaceDefault(e) {
|
|
15
|
-
var n = Object.create(null);
|
|
16
|
-
if (e) {
|
|
17
|
-
Object.keys(e).forEach(function (k) {
|
|
18
|
-
if (k !== 'default') {
|
|
19
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return e[k]; }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
n.default = e;
|
|
28
|
-
return Object.freeze(n);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var p__namespace = /*#__PURE__*/_interopNamespaceDefault(p);
|
|
32
12
|
|
|
33
13
|
/** Tracks changes that have to be made for specific files. */
|
|
34
14
|
class ChangeTracker {
|
|
@@ -216,104 +196,5 @@ function normalizePath(path) {
|
|
|
216
196
|
return path.replace(/\\/g, '/');
|
|
217
197
|
}
|
|
218
198
|
|
|
219
|
-
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
220
|
-
const { config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
|
|
221
|
-
const parseConfigHost = {
|
|
222
|
-
useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
|
|
223
|
-
fileExists: ts.sys.fileExists,
|
|
224
|
-
readDirectory: ts.sys.readDirectory,
|
|
225
|
-
readFile: ts.sys.readFile,
|
|
226
|
-
};
|
|
227
|
-
// Throw if incorrect arguments are passed to this function. Passing relative base paths
|
|
228
|
-
// results in root directories not being resolved and in later type checking runtime errors.
|
|
229
|
-
// More details can be found here: https://github.com/microsoft/TypeScript/issues/37731.
|
|
230
|
-
if (!p__namespace.isAbsolute(basePath)) {
|
|
231
|
-
throw Error('Unexpected relative base path has been specified.');
|
|
232
|
-
}
|
|
233
|
-
return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Creates a TypeScript program instance for a TypeScript project within
|
|
238
|
-
* the virtual file system tree.
|
|
239
|
-
* @param tree Virtual file system tree that contains the source files.
|
|
240
|
-
* @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
|
|
241
|
-
* @param basePath Base path for the virtual file system tree.
|
|
242
|
-
* @param fakeFileRead Optional file reader function. Can be used to overwrite files in
|
|
243
|
-
* the TypeScript program, or to add in-memory files (e.g. to add global types).
|
|
244
|
-
* @param additionalFiles Additional file paths that should be added to the program.
|
|
245
|
-
*/
|
|
246
|
-
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
247
|
-
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead);
|
|
248
|
-
return ts.createProgram(rootNames, options, host);
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Creates the options necessary to instantiate a TypeScript program.
|
|
252
|
-
* @param tree Virtual file system tree that contains the source files.
|
|
253
|
-
* @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
|
|
254
|
-
* @param basePath Base path for the virtual file system tree.
|
|
255
|
-
* @param fakeFileRead Optional file reader function. Can be used to overwrite files in
|
|
256
|
-
* the TypeScript program, or to add in-memory files (e.g. to add global types).
|
|
257
|
-
* @param additionalFiles Additional file paths that should be added to the program.
|
|
258
|
-
* @param optionOverrides Overrides of the parsed compiler options.
|
|
259
|
-
*/
|
|
260
|
-
function createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles, optionOverrides) {
|
|
261
|
-
// Resolve the tsconfig path to an absolute path. This is needed as TypeScript otherwise
|
|
262
|
-
// is not able to resolve root directories in the given tsconfig. More details can be found
|
|
263
|
-
// in the following issue: https://github.com/microsoft/TypeScript/issues/37731.
|
|
264
|
-
tsconfigPath = p.resolve(basePath, tsconfigPath);
|
|
265
|
-
const parsed = parseTsconfigFile(tsconfigPath, p.dirname(tsconfigPath));
|
|
266
|
-
const options = optionOverrides ? { ...parsed.options, ...optionOverrides } : parsed.options;
|
|
267
|
-
const host = createMigrationCompilerHost(tree, options, basePath, fakeFileRead);
|
|
268
|
-
return { rootNames: parsed.fileNames.concat([]), options, host };
|
|
269
|
-
}
|
|
270
|
-
function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
|
|
271
|
-
const host = ts.createCompilerHost(options, true);
|
|
272
|
-
const defaultReadFile = host.readFile;
|
|
273
|
-
// We need to overwrite the host "readFile" method, as we want the TypeScript
|
|
274
|
-
// program to be based on the file contents in the virtual file tree. Otherwise
|
|
275
|
-
// if we run multiple migrations we might have intersecting changes and
|
|
276
|
-
// source files.
|
|
277
|
-
host.readFile = (fileName) => {
|
|
278
|
-
const treeRelativePath = p.relative(basePath, fileName);
|
|
279
|
-
let result = fakeRead?.(treeRelativePath);
|
|
280
|
-
if (typeof result !== 'string') {
|
|
281
|
-
// If the relative path resolved to somewhere outside of the tree, fall back to
|
|
282
|
-
// TypeScript's default file reading function since the `tree` will throw an error.
|
|
283
|
-
result = treeRelativePath.startsWith('..')
|
|
284
|
-
? defaultReadFile.call(host, fileName)
|
|
285
|
-
: tree.read(treeRelativePath)?.toString();
|
|
286
|
-
}
|
|
287
|
-
// Strip BOM as otherwise TSC methods (Ex: getWidth) will return an offset,
|
|
288
|
-
// which breaks the CLI UpdateRecorder.
|
|
289
|
-
// See: https://github.com/angular/angular/pull/30719
|
|
290
|
-
return typeof result === 'string' ? result.replace(/^\uFEFF/, '') : undefined;
|
|
291
|
-
};
|
|
292
|
-
return host;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Checks whether a file can be migrate by our automated migrations.
|
|
296
|
-
* @param basePath Absolute path to the project.
|
|
297
|
-
* @param sourceFile File being checked.
|
|
298
|
-
* @param program Program that includes the source file.
|
|
299
|
-
*/
|
|
300
|
-
function canMigrateFile(basePath, sourceFile, program) {
|
|
301
|
-
// We shouldn't migrate .d.ts files, files from an external library or type checking files.
|
|
302
|
-
if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
|
|
303
|
-
sourceFile.isDeclarationFile ||
|
|
304
|
-
program.isSourceFileFromExternalLibrary(sourceFile)) {
|
|
305
|
-
return false;
|
|
306
|
-
}
|
|
307
|
-
// Our migrations are set up to create a `Program` from the project's tsconfig and to migrate all
|
|
308
|
-
// the files within the program. This can include files that are outside of the Angular CLI
|
|
309
|
-
// project. We can't migrate files outside of the project, because our file system interactions
|
|
310
|
-
// go through the CLI's `Tree` which assumes that all files are within the project. See:
|
|
311
|
-
// https://github.com/angular/angular-cli/blob/0b0961c9c233a825b6e4bb59ab7f0790f9b14676/packages/angular_devkit/schematics/src/tree/host-tree.ts#L131
|
|
312
|
-
return !p.relative(basePath, sourceFile.fileName).startsWith('..');
|
|
313
|
-
}
|
|
314
|
-
|
|
315
199
|
exports.ChangeTracker = ChangeTracker;
|
|
316
|
-
exports.canMigrateFile = canMigrateFile;
|
|
317
|
-
exports.createMigrationProgram = createMigrationProgram;
|
|
318
|
-
exports.createProgramOptions = createProgramOptions;
|
|
319
200
|
exports.normalizePath = normalizePath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -30742,7 +30742,7 @@ function publishFacade(global) {
|
|
|
30742
30742
|
* @description
|
|
30743
30743
|
* Entry point for all public APIs of the compiler package.
|
|
30744
30744
|
*/
|
|
30745
|
-
new Version('19.2.
|
|
30745
|
+
new Version('19.2.16');
|
|
30746
30746
|
|
|
30747
30747
|
const _I18N_ATTR = 'i18n';
|
|
30748
30748
|
const _I18N_ATTR_PREFIX = 'i18n-';
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var p = require('path');
|
|
10
|
+
var ts = require('typescript');
|
|
11
|
+
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var p__namespace = /*#__PURE__*/_interopNamespaceDefault(p);
|
|
30
|
+
|
|
31
|
+
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
32
|
+
const { config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
|
|
33
|
+
const parseConfigHost = {
|
|
34
|
+
useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
|
|
35
|
+
fileExists: ts.sys.fileExists,
|
|
36
|
+
readDirectory: ts.sys.readDirectory,
|
|
37
|
+
readFile: ts.sys.readFile,
|
|
38
|
+
};
|
|
39
|
+
// Throw if incorrect arguments are passed to this function. Passing relative base paths
|
|
40
|
+
// results in root directories not being resolved and in later type checking runtime errors.
|
|
41
|
+
// More details can be found here: https://github.com/microsoft/TypeScript/issues/37731.
|
|
42
|
+
if (!p__namespace.isAbsolute(basePath)) {
|
|
43
|
+
throw Error('Unexpected relative base path has been specified.');
|
|
44
|
+
}
|
|
45
|
+
return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Creates a TypeScript program instance for a TypeScript project within
|
|
50
|
+
* the virtual file system tree.
|
|
51
|
+
* @param tree Virtual file system tree that contains the source files.
|
|
52
|
+
* @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
|
|
53
|
+
* @param basePath Base path for the virtual file system tree.
|
|
54
|
+
* @param fakeFileRead Optional file reader function. Can be used to overwrite files in
|
|
55
|
+
* the TypeScript program, or to add in-memory files (e.g. to add global types).
|
|
56
|
+
* @param additionalFiles Additional file paths that should be added to the program.
|
|
57
|
+
*/
|
|
58
|
+
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
59
|
+
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead);
|
|
60
|
+
return ts.createProgram(rootNames, options, host);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Creates the options necessary to instantiate a TypeScript program.
|
|
64
|
+
* @param tree Virtual file system tree that contains the source files.
|
|
65
|
+
* @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
|
|
66
|
+
* @param basePath Base path for the virtual file system tree.
|
|
67
|
+
* @param fakeFileRead Optional file reader function. Can be used to overwrite files in
|
|
68
|
+
* the TypeScript program, or to add in-memory files (e.g. to add global types).
|
|
69
|
+
* @param additionalFiles Additional file paths that should be added to the program.
|
|
70
|
+
* @param optionOverrides Overrides of the parsed compiler options.
|
|
71
|
+
*/
|
|
72
|
+
function createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles, optionOverrides) {
|
|
73
|
+
// Resolve the tsconfig path to an absolute path. This is needed as TypeScript otherwise
|
|
74
|
+
// is not able to resolve root directories in the given tsconfig. More details can be found
|
|
75
|
+
// in the following issue: https://github.com/microsoft/TypeScript/issues/37731.
|
|
76
|
+
tsconfigPath = p.resolve(basePath, tsconfigPath);
|
|
77
|
+
const parsed = parseTsconfigFile(tsconfigPath, p.dirname(tsconfigPath));
|
|
78
|
+
const options = optionOverrides ? { ...parsed.options, ...optionOverrides } : parsed.options;
|
|
79
|
+
const host = createMigrationCompilerHost(tree, options, basePath, fakeFileRead);
|
|
80
|
+
return { rootNames: parsed.fileNames.concat([]), options, host };
|
|
81
|
+
}
|
|
82
|
+
function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
|
|
83
|
+
const host = ts.createCompilerHost(options, true);
|
|
84
|
+
const defaultReadFile = host.readFile;
|
|
85
|
+
// We need to overwrite the host "readFile" method, as we want the TypeScript
|
|
86
|
+
// program to be based on the file contents in the virtual file tree. Otherwise
|
|
87
|
+
// if we run multiple migrations we might have intersecting changes and
|
|
88
|
+
// source files.
|
|
89
|
+
host.readFile = (fileName) => {
|
|
90
|
+
const treeRelativePath = p.relative(basePath, fileName);
|
|
91
|
+
let result = fakeRead?.(treeRelativePath);
|
|
92
|
+
if (typeof result !== 'string') {
|
|
93
|
+
// If the relative path resolved to somewhere outside of the tree, fall back to
|
|
94
|
+
// TypeScript's default file reading function since the `tree` will throw an error.
|
|
95
|
+
result = treeRelativePath.startsWith('..')
|
|
96
|
+
? defaultReadFile.call(host, fileName)
|
|
97
|
+
: tree.read(treeRelativePath)?.toString();
|
|
98
|
+
}
|
|
99
|
+
// Strip BOM as otherwise TSC methods (Ex: getWidth) will return an offset,
|
|
100
|
+
// which breaks the CLI UpdateRecorder.
|
|
101
|
+
// See: https://github.com/angular/angular/pull/30719
|
|
102
|
+
return typeof result === 'string' ? result.replace(/^\uFEFF/, '') : undefined;
|
|
103
|
+
};
|
|
104
|
+
return host;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Checks whether a file can be migrate by our automated migrations.
|
|
108
|
+
* @param basePath Absolute path to the project.
|
|
109
|
+
* @param sourceFile File being checked.
|
|
110
|
+
* @param program Program that includes the source file.
|
|
111
|
+
*/
|
|
112
|
+
function canMigrateFile(basePath, sourceFile, program) {
|
|
113
|
+
// We shouldn't migrate .d.ts files, files from an external library or type checking files.
|
|
114
|
+
if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
|
|
115
|
+
sourceFile.isDeclarationFile ||
|
|
116
|
+
program.isSourceFileFromExternalLibrary(sourceFile)) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
// Our migrations are set up to create a `Program` from the project's tsconfig and to migrate all
|
|
120
|
+
// the files within the program. This can include files that are outside of the Angular CLI
|
|
121
|
+
// project. We can't migrate files outside of the project, because our file system interactions
|
|
122
|
+
// go through the CLI's `Tree` which assumes that all files are within the project. See:
|
|
123
|
+
// https://github.com/angular/angular-cli/blob/0b0961c9c233a825b6e4bb59ab7f0790f9b14676/packages/angular_devkit/schematics/src/tree/host-tree.ts#L131
|
|
124
|
+
return !p.relative(basePath, sourceFile.fileName).startsWith('..');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
exports.canMigrateFile = canMigrateFile;
|
|
128
|
+
exports.createMigrationProgram = createMigrationProgram;
|
|
129
|
+
exports.createProgramOptions = createProgramOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var
|
|
11
|
+
var change_tracker = require('./change_tracker-BfH3nBIf.cjs');
|
|
12
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
12
13
|
var checker = require('./checker-BwV9MjSQ.cjs');
|
|
13
14
|
var ts = require('typescript');
|
|
14
15
|
require('os');
|
|
@@ -1839,7 +1840,7 @@ function migrateTemplate(template, templateType, node, file, format = true, anal
|
|
|
1839
1840
|
function migrate(options) {
|
|
1840
1841
|
return async (tree, context) => {
|
|
1841
1842
|
const basePath = process.cwd();
|
|
1842
|
-
const pathToMigrate =
|
|
1843
|
+
const pathToMigrate = change_tracker.normalizePath(p.join(basePath, options.path));
|
|
1843
1844
|
let allPaths = [];
|
|
1844
1845
|
if (pathToMigrate.trim() !== '') {
|
|
1845
1846
|
allPaths.push(pathToMigrate);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,8 +9,9 @@
|
|
|
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.cjs');
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
+
var change_tracker = require('./change_tracker-BfH3nBIf.cjs');
|
|
14
15
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
15
16
|
require('@angular-devkit/core');
|
|
16
17
|
require('./checker-BwV9MjSQ.cjs');
|
|
@@ -24,7 +25,7 @@ const DIRECTIVE = 'Directive';
|
|
|
24
25
|
const COMPONENT = 'Component';
|
|
25
26
|
const PIPE = 'Pipe';
|
|
26
27
|
function migrateFile(sourceFile, rewriteFn) {
|
|
27
|
-
const changeTracker = new
|
|
28
|
+
const changeTracker = new change_tracker.ChangeTracker(ts.createPrinter());
|
|
28
29
|
// Check if there are any imports of the `AfterRenderPhase` enum.
|
|
29
30
|
const coreImports = imports.getNamedImports(sourceFile, CORE);
|
|
30
31
|
if (!coreImports) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1005,7 +1005,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
1005
1005
|
function compileDeclareClassMetadata(metadata) {
|
|
1006
1006
|
const definitionMap = new checker.DefinitionMap();
|
|
1007
1007
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
1008
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1008
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1009
1009
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1010
1010
|
definitionMap.set('type', metadata.type);
|
|
1011
1011
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -1023,7 +1023,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
1023
1023
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
|
|
1024
1024
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
|
|
1025
1025
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
1026
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1026
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1027
1027
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1028
1028
|
definitionMap.set('type', metadata.type);
|
|
1029
1029
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -1118,7 +1118,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
1118
1118
|
const definitionMap = new checker.DefinitionMap();
|
|
1119
1119
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
1120
1120
|
definitionMap.set('minVersion', checker.literal(minVersion));
|
|
1121
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1121
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1122
1122
|
// e.g. `type: MyDirective`
|
|
1123
1123
|
definitionMap.set('type', meta.type.value);
|
|
1124
1124
|
if (meta.isStandalone !== undefined) {
|
|
@@ -1534,7 +1534,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1534
1534
|
function compileDeclareFactoryFunction(meta) {
|
|
1535
1535
|
const definitionMap = new checker.DefinitionMap();
|
|
1536
1536
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1537
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1537
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1538
1538
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1539
1539
|
definitionMap.set('type', meta.type.value);
|
|
1540
1540
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1569,7 +1569,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1569
1569
|
function createInjectableDefinitionMap(meta) {
|
|
1570
1570
|
const definitionMap = new checker.DefinitionMap();
|
|
1571
1571
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1572
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1572
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1573
1573
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1574
1574
|
definitionMap.set('type', meta.type.value);
|
|
1575
1575
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1620,7 +1620,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1620
1620
|
function createInjectorDefinitionMap(meta) {
|
|
1621
1621
|
const definitionMap = new checker.DefinitionMap();
|
|
1622
1622
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1623
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1623
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1624
1624
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1625
1625
|
definitionMap.set('type', meta.type.value);
|
|
1626
1626
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1653,7 +1653,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1653
1653
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1654
1654
|
}
|
|
1655
1655
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1656
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1656
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1657
1657
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1658
1658
|
definitionMap.set('type', meta.type.value);
|
|
1659
1659
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1704,7 +1704,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1704
1704
|
function createPipeDefinitionMap(meta) {
|
|
1705
1705
|
const definitionMap = new checker.DefinitionMap();
|
|
1706
1706
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1707
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1707
|
+
definitionMap.set('version', checker.literal('19.2.16'));
|
|
1708
1708
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1709
1709
|
// e.g. `type: MyPipe`
|
|
1710
1710
|
definitionMap.set('type', meta.type.value);
|
|
@@ -10730,7 +10730,7 @@ class PipeDecoratorHandler {
|
|
|
10730
10730
|
* @description
|
|
10731
10731
|
* Entry point for all public APIs of the compiler-cli package.
|
|
10732
10732
|
*/
|
|
10733
|
-
new checker.Version('19.2.
|
|
10733
|
+
new checker.Version('19.2.16');
|
|
10734
10734
|
|
|
10735
10735
|
/**
|
|
10736
10736
|
* Whether a given decorator should be treated as an Angular decorator.
|
|
@@ -18583,7 +18583,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
18583
18583
|
* @param minVersion Minimum required version for the feature.
|
|
18584
18584
|
*/
|
|
18585
18585
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
18586
|
-
// A version of `19.2.
|
|
18586
|
+
// A version of `19.2.16` usually means that core is at head so it supports
|
|
18587
18587
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
18588
18588
|
// with the current version during build time.
|
|
18589
18589
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var
|
|
11
|
+
var change_tracker = require('./change_tracker-BfH3nBIf.cjs');
|
|
12
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
12
13
|
var ts = require('typescript');
|
|
13
14
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
14
15
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
@@ -679,7 +680,7 @@ function migrateFile(sourceFile, options) {
|
|
|
679
680
|
return [];
|
|
680
681
|
}
|
|
681
682
|
const printer = ts.createPrinter();
|
|
682
|
-
const tracker = new
|
|
683
|
+
const tracker = new change_tracker.ChangeTracker(printer);
|
|
683
684
|
analysis.classes.forEach(({ node, constructor, superCall }) => {
|
|
684
685
|
const memberIndentation = leading_space.getLeadingLineWhitespaceOfNode(node.members[0]);
|
|
685
686
|
const prependToClass = [];
|
|
@@ -1236,7 +1237,7 @@ function replaceParameterReferencesInInitializer(initializer, constructor, local
|
|
|
1236
1237
|
function migrate(options) {
|
|
1237
1238
|
return async (tree) => {
|
|
1238
1239
|
const basePath = process.cwd();
|
|
1239
|
-
const pathToMigrate =
|
|
1240
|
+
const pathToMigrate = change_tracker.normalizePath(p.join(basePath, options.path));
|
|
1240
1241
|
let allPaths = [];
|
|
1241
1242
|
if (pathToMigrate.trim() !== '') {
|
|
1242
1243
|
allPaths.push(pathToMigrate);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,8 +9,9 @@
|
|
|
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.cjs');
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
+
var change_tracker = require('./change_tracker-BfH3nBIf.cjs');
|
|
14
15
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
15
16
|
require('@angular-devkit/core');
|
|
16
17
|
require('./checker-BwV9MjSQ.cjs');
|
|
@@ -22,7 +23,7 @@ require('url');
|
|
|
22
23
|
const CORE = '@angular/core';
|
|
23
24
|
const EXPERIMENTAL_PENDING_TASKS = 'ExperimentalPendingTasks';
|
|
24
25
|
function migrateFile(sourceFile, typeChecker, rewriteFn) {
|
|
25
|
-
const changeTracker = new
|
|
26
|
+
const changeTracker = new change_tracker.ChangeTracker(ts.createPrinter());
|
|
26
27
|
// Check if there are any imports of the `AfterRenderPhase` enum.
|
|
27
28
|
const coreImports = imports.getNamedImports(sourceFile, CORE);
|
|
28
29
|
if (!coreImports) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.16
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,8 +9,9 @@
|
|
|
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.cjs');
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
+
var change_tracker = require('./change_tracker-BfH3nBIf.cjs');
|
|
14
15
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
15
16
|
require('@angular-devkit/core');
|
|
16
17
|
require('./checker-BwV9MjSQ.cjs');
|
|
@@ -20,7 +21,7 @@ require('module');
|
|
|
20
21
|
require('url');
|
|
21
22
|
|
|
22
23
|
function migrateFile(sourceFile, rewriteFn) {
|
|
23
|
-
const changeTracker = new
|
|
24
|
+
const changeTracker = new change_tracker.ChangeTracker(ts.createPrinter());
|
|
24
25
|
const visitNode = (node) => {
|
|
25
26
|
const provider = tryParseProviderExpression(node);
|
|
26
27
|
if (provider) {
|