@angular/core 20.1.4 → 20.1.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 +1 -1
- package/chrome_dev_tools_performance.d.d.ts +1 -1
- package/discovery.d.d.ts +1 -1
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/attribute.mjs.map +1 -1
- package/fesm2022/core.mjs +2 -2
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +14 -5
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/not_found.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/resource.mjs +1 -1
- package/fesm2022/resource.mjs.map +1 -1
- package/fesm2022/root_effect_scheduler.mjs +1 -1
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal.mjs +1 -1
- package/fesm2022/signal.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/untracked.mjs +1 -1
- package/fesm2022/untracked.mjs.map +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/fesm2022/weak_ref.mjs.map +1 -1
- package/graph.d.d.ts +1 -1
- package/index.d.ts +3 -1
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/{apply_import_manager-BwG_XNz3.cjs → apply_import_manager-BeiseOfz.cjs} +4 -4
- package/schematics/bundles/cleanup-unused-imports.cjs +7 -8
- package/schematics/bundles/{compiler_host-BouiutKy.cjs → compiler_host-CIkS8EIQ.cjs} +3 -3
- package/schematics/bundles/control-flow-migration.cjs +18 -19
- package/schematics/bundles/document-core.cjs +6 -7
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-C7alPIzS.cjs → index-CuCkSYir.cjs} +1254 -1246
- package/schematics/bundles/{index-C4RI5-xz.cjs → index-Dek52tJB.cjs} +49 -49
- package/schematics/bundles/inject-flags.cjs +6 -7
- package/schematics/bundles/inject-migration.cjs +6 -7
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-BXdun0jT.cjs → migrate_ts_type_references-MVe5vYII.cjs} +14 -14
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +20 -21
- package/schematics/bundles/{project_paths-KZ5syi8v.cjs → project_paths-BKtwr3ir.cjs} +16 -17
- package/schematics/bundles/{checker-B1MkHERe.cjs → project_tsconfig_paths-DA1eve-D.cjs} +139 -24
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +6 -7
- package/schematics/bundles/self-closing-tags-migration.cjs +10 -11
- package/schematics/bundles/signal-input-migration.cjs +21 -22
- package/schematics/bundles/signal-queries-migration.cjs +31 -32
- package/schematics/bundles/signals.cjs +8 -9
- package/schematics/bundles/standalone-migration.cjs +10 -11
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -5
- package/signal.d.d.ts +1 -1
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +0 -90
package/fesm2022/untracked.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"untracked.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"untracked.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/linked_signal.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/untracked.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {COMPUTING, ERRORED, UNSET} from './computed';\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n producerAccessed,\n producerMarkClean,\n producerUpdateValueVersion,\n REACTIVE_NODE,\n ReactiveNode,\n runPostProducerCreatedFn,\n SIGNAL,\n} from './graph';\nimport {signalSetFn, signalUpdateFn} from './signal';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\nexport type ComputationFn<S, D> = (source: S, previous?: {source: S; value: D}) => D;\n\nexport interface LinkedSignalNode<S, D> extends ReactiveNode {\n /**\n * Value of the source signal that was used to derive the computed value.\n */\n sourceValue: S;\n\n /**\n * Current state value, or one of the sentinel values (`UNSET`, `COMPUTING`,\n * `ERROR`).\n */\n value: D;\n\n /**\n * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n * be re-thrown.\n */\n error: unknown;\n\n /**\n * The source function represents reactive dependency based on which the linked state is reset.\n */\n source: () => S;\n\n /**\n * The computation function which will produce a new value based on the source and, optionally - previous values.\n */\n computation: ComputationFn<S, D>;\n\n equal: ValueEqualityFn<D>;\n}\n\nexport type LinkedSignalGetter<S, D> = (() => D) & {\n [SIGNAL]: LinkedSignalNode<S, D>;\n};\n\nexport function createLinkedSignal<S, D>(\n sourceFn: () => S,\n computationFn: ComputationFn<S, D>,\n equalityFn?: ValueEqualityFn<D>,\n): LinkedSignalGetter<S, D> {\n const node: LinkedSignalNode<S, D> = Object.create(LINKED_SIGNAL_NODE);\n\n node.source = sourceFn;\n node.computation = computationFn;\n if (equalityFn != undefined) {\n node.equal = equalityFn;\n }\n\n const linkedSignalGetter = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === ERRORED) {\n throw node.error;\n }\n\n return node.value;\n };\n\n const getter = linkedSignalGetter as LinkedSignalGetter<S, D>;\n getter[SIGNAL] = node;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const debugName = node.debugName ? ' (' + node.debugName + ')' : '';\n getter.toString = () => `[LinkedSignal${debugName}: ${node.value}]`;\n }\n\n runPostProducerCreatedFn(node);\n\n return getter;\n}\n\nexport function linkedSignalSetFn<S, D>(node: LinkedSignalNode<S, D>, newValue: D) {\n producerUpdateValueVersion(node);\n signalSetFn(node, newValue);\n producerMarkClean(node);\n}\n\nexport function linkedSignalUpdateFn<S, D>(\n node: LinkedSignalNode<S, D>,\n updater: (value: D) => D,\n): void {\n producerUpdateValueVersion(node);\n signalUpdateFn(node, updater);\n producerMarkClean(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const LINKED_SIGNAL_NODE: object = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n kind: 'linkedSignal',\n\n producerMustRecompute(node: LinkedSignalNode<unknown, unknown>): boolean {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n\n producerRecomputeValue(node: LinkedSignalNode<unknown, unknown>): void {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '',\n );\n }\n\n const oldValue = node.value;\n node.value = COMPUTING;\n\n const prevConsumer = consumerBeforeComputation(node);\n let newValue: unknown;\n try {\n const newSourceValue = node.source();\n const prev =\n oldValue === UNSET || oldValue === ERRORED\n ? undefined\n : {\n source: node.sourceValue,\n value: oldValue,\n };\n newValue = node.computation(newSourceValue, prev);\n node.sourceValue = newSourceValue;\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n\n if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n\n node.value = newValue;\n node.version++;\n },\n };\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from './graph';\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n */\nexport function untracked<T>(nonReactiveReadsFn: () => T): T {\n const prevConsumer = setActiveConsumer(null);\n // We are not trying to catch any particular errors here, just making sure that the consumers\n // stack is restored in case of errors.\n try {\n return nonReactiveReadsFn();\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n"],"names":[],"mappings":";;;;;;;;SAgEgB,kBAAkB,CAChC,QAAiB,EACjB,aAAkC,EAClC,UAA+B,EAAA;IAE/B,MAAM,IAAI,GAA2B,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;AAEtE,IAAA,IAAI,CAAC,MAAM,GAAG,QAAQ;AACtB,IAAA,IAAI,CAAC,WAAW,GAAG,aAAa;AAChC,IAAA,IAAI,UAAU,IAAI,SAAS,EAAE;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,UAAU;;IAGzB,MAAM,kBAAkB,GAAG,MAAK;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AC,OAAO,EAAE;SACf;KACF;AACH,CAAC,GAAG;;ACxKJ;;;AAGG;AACG,SAAU,SAAS,CAAI,kBAA2B,EAAA;AACtD,IAAA,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC;;;AAG5C,IAAA,IAAI;QACF,OAAO,kBAAkB,EAAE;;YACnB;QACR,iBAAiB,CAAC,YAAY,CAAC;;AAEnC;;;;"}
|
package/fesm2022/weak_ref.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weak_ref.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"weak_ref.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/weak_ref.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function setAlternateWeakRefImpl(impl: unknown) {\n // TODO: remove this function\n}\n"],"names":[],"mappings":";;;;;;AAQM,SAAU,uBAAuB,CAAC,IAAa,EAAA;;AAErD;;;;"}
|
package/graph.d.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.1.
|
|
2
|
+
* @license Angular v20.1.5
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4912,6 +4912,7 @@ declare const enum RuntimeErrorCode {
|
|
|
4912
4912
|
MISSING_NG_MODULE_DEFINITION = 915,
|
|
4913
4913
|
MISSING_DIRECTIVE_DEFINITION = 916,
|
|
4914
4914
|
NO_COMPONENT_FACTORY_FOUND = 917,
|
|
4915
|
+
EXTERNAL_RESOURCE_LOADING_FAILED = 918,
|
|
4915
4916
|
REQUIRED_INPUT_NO_VALUE = -950,
|
|
4916
4917
|
REQUIRED_QUERY_NO_VALUE = -951,
|
|
4917
4918
|
REQUIRED_MODEL_NO_VALUE = 952,
|
|
@@ -5242,6 +5243,7 @@ declare const DEFAULT_LOCALE_ID = "en-US";
|
|
|
5242
5243
|
*/
|
|
5243
5244
|
declare function resolveComponentResources(resourceResolver: (url: string) => Promise<string | {
|
|
5244
5245
|
text(): Promise<string>;
|
|
5246
|
+
status?: number;
|
|
5245
5247
|
}>): Promise<void>;
|
|
5246
5248
|
declare function isComponentDefPendingResolution(type: Type$1<any>): boolean;
|
|
5247
5249
|
declare function clearResolutionOfComponentResourcesQueue(): Map<Type$1<any>, Component>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.5",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/compiler": "20.1.
|
|
49
|
+
"@angular/compiler": "20.1.5",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
51
51
|
"zone.js": "~0.15.0"
|
|
52
52
|
},
|
package/primitives/di/index.d.ts
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
package/schematics/bundles/{apply_import_manager-BwG_XNz3.cjs → apply_import_manager-BeiseOfz.cjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.1.
|
|
3
|
+
* @license Angular v20.1.5
|
|
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 ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var
|
|
12
|
-
var project_paths = require('./project_paths-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DA1eve-D.cjs');
|
|
12
|
+
var project_paths = require('./project_paths-BKtwr3ir.cjs');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Applies import manager changes, and writes them as replacements the
|
|
@@ -23,7 +23,7 @@ function applyImportManagerChanges(importManager, replacements, sourceFiles, inf
|
|
|
23
23
|
newImports.forEach((newImports, fileName) => {
|
|
24
24
|
newImports.forEach((newImport) => {
|
|
25
25
|
const printedImport = printer.printNode(ts.EmitHint.Unspecified, newImport, pathToFile.get(fileName));
|
|
26
|
-
replacements.push(new project_paths.Replacement(project_paths.projectFile(
|
|
26
|
+
replacements.push(new project_paths.Replacement(project_paths.projectFile(project_tsconfig_paths.absoluteFrom(fileName), info), new project_paths.TextUpdate({ position: 0, end: 0, toInsert: `${printedImport}\n` })));
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
// Capture updated imports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.1.
|
|
3
|
+
* @license Angular v20.1.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
require('@angular-devkit/core');
|
|
10
10
|
require('node:path/posix');
|
|
11
|
-
var project_paths = require('./project_paths-
|
|
11
|
+
var project_paths = require('./project_paths-BKtwr3ir.cjs');
|
|
12
12
|
var ts = require('typescript');
|
|
13
13
|
require('os');
|
|
14
|
-
var
|
|
15
|
-
var index = require('./index-
|
|
14
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DA1eve-D.cjs');
|
|
15
|
+
var index = require('./index-CuCkSYir.cjs');
|
|
16
16
|
require('path');
|
|
17
17
|
require('node:path');
|
|
18
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
18
|
+
var apply_import_manager = require('./apply_import_manager-BeiseOfz.cjs');
|
|
19
19
|
require('@angular-devkit/schematics');
|
|
20
|
-
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
21
20
|
require('fs');
|
|
22
21
|
require('module');
|
|
23
22
|
require('url');
|
|
@@ -44,7 +43,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
44
43
|
if (diag.file !== undefined &&
|
|
45
44
|
diag.start !== undefined &&
|
|
46
45
|
diag.length !== undefined &&
|
|
47
|
-
diag.code ===
|
|
46
|
+
diag.code === project_tsconfig_paths.ngErrorCode(project_tsconfig_paths.ErrorCode.UNUSED_STANDALONE_IMPORTS)) {
|
|
48
47
|
// Skip files that aren't owned by this compilation unit.
|
|
49
48
|
if (!info.sourceFiles.includes(diag.file)) {
|
|
50
49
|
return;
|
|
@@ -194,7 +193,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
194
193
|
generateReplacements(sourceFile, removalLocations, usages, info, replacements) {
|
|
195
194
|
const { fullRemovals, partialRemovals, allRemovedIdentifiers } = removalLocations;
|
|
196
195
|
const { importedSymbols, identifierCounts } = usages;
|
|
197
|
-
const importManager = new
|
|
196
|
+
const importManager = new project_tsconfig_paths.ImportManager();
|
|
198
197
|
const sourceText = sourceFile.getFullText();
|
|
199
198
|
// Replace full arrays with empty ones. This allows preserves more of the user's formatting.
|
|
200
199
|
fullRemovals.forEach((node) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.1.
|
|
3
|
+
* @license Angular v20.1.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 ts = require('typescript');
|
|
10
|
-
var
|
|
10
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DA1eve-D.cjs');
|
|
11
11
|
require('os');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
|
|
@@ -40,7 +40,7 @@ class ChangeTracker {
|
|
|
40
40
|
constructor(_printer, _importRemapper) {
|
|
41
41
|
this._printer = _printer;
|
|
42
42
|
this._importRemapper = _importRemapper;
|
|
43
|
-
this._importManager = new
|
|
43
|
+
this._importManager = new project_tsconfig_paths.ImportManager({
|
|
44
44
|
shouldUseSingleQuotes: (file) => this._getQuoteKind(file) === 0 /* QuoteKind.SINGLE */,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.1.
|
|
3
|
+
* @license Angular v20.1.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,10 +8,9 @@
|
|
|
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
|
|
11
|
+
var compiler_host = require('./compiler_host-CIkS8EIQ.cjs');
|
|
12
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DA1eve-D.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
15
14
|
require('os');
|
|
16
15
|
require('fs');
|
|
17
16
|
require('module');
|
|
@@ -275,7 +274,7 @@ class AnalyzedFile {
|
|
|
275
274
|
}
|
|
276
275
|
}
|
|
277
276
|
/** Finds all non-control flow elements from common module. */
|
|
278
|
-
class CommonCollector extends
|
|
277
|
+
class CommonCollector extends project_tsconfig_paths.RecursiveVisitor$1 {
|
|
279
278
|
count = 0;
|
|
280
279
|
visitElement(el) {
|
|
281
280
|
if (el.attrs.length > 0) {
|
|
@@ -314,7 +313,7 @@ class CommonCollector extends checker.RecursiveVisitor$1 {
|
|
|
314
313
|
}
|
|
315
314
|
}
|
|
316
315
|
/** Finds all elements that represent i18n blocks. */
|
|
317
|
-
class i18nCollector extends
|
|
316
|
+
class i18nCollector extends project_tsconfig_paths.RecursiveVisitor$1 {
|
|
318
317
|
elements = [];
|
|
319
318
|
visitElement(el) {
|
|
320
319
|
if (el.attrs.find((a) => a.name === 'i18n') !== undefined) {
|
|
@@ -324,7 +323,7 @@ class i18nCollector extends checker.RecursiveVisitor$1 {
|
|
|
324
323
|
}
|
|
325
324
|
}
|
|
326
325
|
/** Finds all elements with ngif structural directives. */
|
|
327
|
-
class ElementCollector extends
|
|
326
|
+
class ElementCollector extends project_tsconfig_paths.RecursiveVisitor$1 {
|
|
328
327
|
_attributes;
|
|
329
328
|
elements = [];
|
|
330
329
|
constructor(_attributes = []) {
|
|
@@ -377,7 +376,7 @@ class ElementCollector extends checker.RecursiveVisitor$1 {
|
|
|
377
376
|
}
|
|
378
377
|
}
|
|
379
378
|
/** Finds all elements with ngif structural directives. */
|
|
380
|
-
class TemplateCollector extends
|
|
379
|
+
class TemplateCollector extends project_tsconfig_paths.RecursiveVisitor$1 {
|
|
381
380
|
elements = [];
|
|
382
381
|
templates = new Map();
|
|
383
382
|
visitElement(el) {
|
|
@@ -591,7 +590,7 @@ function parseTemplate(template) {
|
|
|
591
590
|
// interpolated text as text nodes containing a mixture of interpolation tokens and text tokens,
|
|
592
591
|
// rather than turning them into `BoundText` nodes like the Ivy AST does. This allows us to
|
|
593
592
|
// easily get the text-only ranges without having to reconstruct the original text.
|
|
594
|
-
parsed = new
|
|
593
|
+
parsed = new project_tsconfig_paths.HtmlParser().parse(template, '', {
|
|
595
594
|
// Allows for ICUs to be parsed.
|
|
596
595
|
tokenizeExpansionForms: true,
|
|
597
596
|
// Explicitly disable blocks so that their characters are treated as plain text.
|
|
@@ -629,7 +628,7 @@ function validateMigratedTemplate(migrated, fileName) {
|
|
|
629
628
|
}
|
|
630
629
|
function validateI18nStructure(parsed, fileName) {
|
|
631
630
|
const visitor = new i18nCollector();
|
|
632
|
-
|
|
631
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.rootNodes);
|
|
633
632
|
const parents = visitor.elements.filter((el) => el.children.length > 0);
|
|
634
633
|
for (const p of parents) {
|
|
635
634
|
for (const el of visitor.elements) {
|
|
@@ -709,7 +708,7 @@ function getTemplates(template) {
|
|
|
709
708
|
const parsed = parseTemplate(template);
|
|
710
709
|
if (parsed.tree !== undefined) {
|
|
711
710
|
const visitor = new TemplateCollector();
|
|
712
|
-
|
|
711
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
713
712
|
for (let [key, tmpl] of visitor.templates) {
|
|
714
713
|
tmpl.count = countTemplateUsage(parsed.tree.rootNodes, key);
|
|
715
714
|
tmpl.generateContents(template);
|
|
@@ -885,7 +884,7 @@ function canRemoveCommonModule(template) {
|
|
|
885
884
|
let removeCommonModule = false;
|
|
886
885
|
if (parsed.tree !== undefined) {
|
|
887
886
|
const visitor = new CommonCollector();
|
|
888
|
-
|
|
887
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
889
888
|
removeCommonModule = visitor.count === 0;
|
|
890
889
|
}
|
|
891
890
|
return removeCommonModule;
|
|
@@ -1008,7 +1007,7 @@ function generateI18nMarkers(tmpl) {
|
|
|
1008
1007
|
let parsed = parseTemplate(tmpl);
|
|
1009
1008
|
if (parsed.tree !== undefined) {
|
|
1010
1009
|
const visitor = new i18nCollector();
|
|
1011
|
-
|
|
1010
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
1012
1011
|
for (const [ix, el] of visitor.elements.entries()) {
|
|
1013
1012
|
// we only care about elements with children and i18n tags
|
|
1014
1013
|
// elements without children have nothing to translate
|
|
@@ -1210,7 +1209,7 @@ function migrateCase(template) {
|
|
|
1210
1209
|
}
|
|
1211
1210
|
let result = template;
|
|
1212
1211
|
const visitor = new ElementCollector(cases);
|
|
1213
|
-
|
|
1212
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
1214
1213
|
calculateNesting(visitor, hasLineBreaks(template));
|
|
1215
1214
|
// this tracks the character shift from different lengths of blocks from
|
|
1216
1215
|
// the prior directives so as to adjust for nested block replacement during
|
|
@@ -1307,7 +1306,7 @@ function migrateFor(template) {
|
|
|
1307
1306
|
}
|
|
1308
1307
|
let result = template;
|
|
1309
1308
|
const visitor = new ElementCollector(fors);
|
|
1310
|
-
|
|
1309
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
1311
1310
|
calculateNesting(visitor, hasLineBreaks(template));
|
|
1312
1311
|
// this tracks the character shift from different lengths of blocks from
|
|
1313
1312
|
// the prior directives so as to adjust for nested block replacement during
|
|
@@ -1512,7 +1511,7 @@ function migrateIf(template) {
|
|
|
1512
1511
|
}
|
|
1513
1512
|
let result = template;
|
|
1514
1513
|
const visitor = new ElementCollector(ifs);
|
|
1515
|
-
|
|
1514
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
1516
1515
|
calculateNesting(visitor, hasLineBreaks(template));
|
|
1517
1516
|
// this tracks the character shift from different lengths of blocks from
|
|
1518
1517
|
// the prior directives so as to adjust for nested block replacement during
|
|
@@ -1705,7 +1704,7 @@ function migrateSwitch(template) {
|
|
|
1705
1704
|
}
|
|
1706
1705
|
let result = template;
|
|
1707
1706
|
const visitor = new ElementCollector(switches);
|
|
1708
|
-
|
|
1707
|
+
project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
1709
1708
|
calculateNesting(visitor, hasLineBreaks(template));
|
|
1710
1709
|
// this tracks the character shift from different lengths of blocks from
|
|
1711
1710
|
// the prior directives so as to adjust for nested block replacement during
|
|
@@ -1736,11 +1735,11 @@ function migrateSwitch(template) {
|
|
|
1736
1735
|
}
|
|
1737
1736
|
function assertValidSwitchStructure(children) {
|
|
1738
1737
|
for (const child of children) {
|
|
1739
|
-
if (child instanceof
|
|
1738
|
+
if (child instanceof project_tsconfig_paths.Text && child.value.trim() !== '') {
|
|
1740
1739
|
throw new Error(`Text node: "${child.value}" would result in invalid migrated @switch block structure. ` +
|
|
1741
1740
|
`@switch can only have @case or @default as children.`);
|
|
1742
1741
|
}
|
|
1743
|
-
else if (child instanceof
|
|
1742
|
+
else if (child instanceof project_tsconfig_paths.Element$1) {
|
|
1744
1743
|
let hasCase = false;
|
|
1745
1744
|
for (const attr of child.attrs) {
|
|
1746
1745
|
if (cases.includes(attr.name)) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.1.
|
|
3
|
+
* @license Angular v20.1.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
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DA1eve-D.cjs');
|
|
10
10
|
require('typescript');
|
|
11
11
|
require('os');
|
|
12
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
13
|
-
require('./index-
|
|
12
|
+
var apply_import_manager = require('./apply_import_manager-BeiseOfz.cjs');
|
|
13
|
+
require('./index-CuCkSYir.cjs');
|
|
14
14
|
require('path');
|
|
15
15
|
require('node:path');
|
|
16
|
-
var project_paths = require('./project_paths-
|
|
16
|
+
var project_paths = require('./project_paths-BKtwr3ir.cjs');
|
|
17
17
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
@@ -21,7 +21,6 @@ require('fs');
|
|
|
21
21
|
require('module');
|
|
22
22
|
require('url');
|
|
23
23
|
require('@angular-devkit/schematics');
|
|
24
|
-
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
25
24
|
|
|
26
25
|
/** Migration that moves the import of `DOCUMENT` from `core` to `common`. */
|
|
27
26
|
class DocumentCoreMigration extends project_paths.TsurgeFunnelMigration {
|
|
@@ -33,7 +32,7 @@ class DocumentCoreMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
33
32
|
if (specifier === null) {
|
|
34
33
|
continue;
|
|
35
34
|
}
|
|
36
|
-
importManager ??= new
|
|
35
|
+
importManager ??= new project_tsconfig_paths.ImportManager({
|
|
37
36
|
// Prevent the manager from trying to generate a non-conflicting import.
|
|
38
37
|
generateUniqueIdentifier: () => null,
|
|
39
38
|
shouldUseSingleQuotes: () => true,
|