@angular/core 20.2.3 → 20.2.4
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/effect.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 +2 -2
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +1 -1
- package/fesm2022/effect.mjs.map +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/not_found.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +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/weak_ref.mjs +1 -1
- package/fesm2022/weak_ref.mjs.map +1 -1
- package/graph.d.d.ts +1 -1
- package/index.d.ts +1 -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-BTXb3nRr.cjs → apply_import_manager-C481F-Gt.cjs} +3 -3
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-Btt7nH4b.cjs → compiler_host-BBQ2scSi.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +3 -3
- package/schematics/bundles/document-core.cjs +5 -5
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-rL7rOVXa.cjs → index-Cwnr5FLK.cjs} +4 -4
- package/schematics/bundles/{index-CAfBb4YL.cjs → index-DXYtX_OC.cjs} +12 -12
- package/schematics/bundles/inject-flags.cjs +5 -5
- package/schematics/bundles/inject-migration.cjs +142 -47
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-Dyjkgb1x.cjs → migrate_ts_type_references-DPTNlXk3.cjs} +5 -5
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{project_paths-BUuKobrE.cjs → project_paths-FWT-fVvl.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-x7xrmbI9.cjs → project_tsconfig_paths-Cj3oe5Ih.cjs} +9 -3
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
- package/schematics/bundles/signal-input-migration.cjs +7 -7
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +4 -4
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -4
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
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-199a4f3c4e20/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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "20.2.
|
|
3
|
+
"version": "20.2.4",
|
|
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.2.
|
|
49
|
+
"@angular/compiler": "20.2.4",
|
|
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-BTXb3nRr.cjs → apply_import_manager-C481F-Gt.cjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
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 project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
var project_paths = require('./project_paths-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
12
|
+
var project_paths = require('./project_paths-FWT-fVvl.cjs');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Applies import manager changes, and writes them as replacements the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,14 +8,14 @@
|
|
|
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-FWT-fVvl.cjs');
|
|
12
12
|
var ts = require('typescript');
|
|
13
13
|
require('os');
|
|
14
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
15
|
-
var index = require('./index-
|
|
14
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
15
|
+
var index = require('./index-DXYtX_OC.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-C481F-Gt.cjs');
|
|
19
19
|
require('@angular-devkit/schematics');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
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 project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
10
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
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 v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
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 path = require('node:path');
|
|
11
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
11
|
+
var compiler_host = require('./compiler_host-BBQ2scSi.cjs');
|
|
12
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
14
|
var p = require('path');
|
|
15
15
|
require('os');
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.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-C481F-Gt.cjs');
|
|
13
|
+
require('./index-DXYtX_OC.cjs');
|
|
14
14
|
require('path');
|
|
15
15
|
require('node:path');
|
|
16
|
-
var project_paths = require('./project_paths-
|
|
16
|
+
var project_paths = require('./project_paths-FWT-fVvl.cjs');
|
|
17
17
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
var index = require('./index-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
12
|
+
var index = require('./index-DXYtX_OC.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-FWT-fVvl.cjs');
|
|
16
16
|
|
|
17
17
|
function getMemberName(member) {
|
|
18
18
|
if (member.name === undefined) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
var p = require('path');
|
|
12
12
|
require('os');
|
|
@@ -891,7 +891,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
891
891
|
function compileDeclareClassMetadata(metadata) {
|
|
892
892
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
893
893
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
894
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
894
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
895
895
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
896
896
|
definitionMap.set('type', metadata.type);
|
|
897
897
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -909,7 +909,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
909
909
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? project_tsconfig_paths.literal(null));
|
|
910
910
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? project_tsconfig_paths.literal(null));
|
|
911
911
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
912
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
912
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
913
913
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
914
914
|
definitionMap.set('type', metadata.type);
|
|
915
915
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -1004,7 +1004,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
1004
1004
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1005
1005
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
1006
1006
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(minVersion));
|
|
1007
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
1007
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
1008
1008
|
// e.g. `type: MyDirective`
|
|
1009
1009
|
definitionMap.set('type', meta.type.value);
|
|
1010
1010
|
if (meta.isStandalone !== undefined) {
|
|
@@ -1420,7 +1420,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1420
1420
|
function compileDeclareFactoryFunction(meta) {
|
|
1421
1421
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1422
1422
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1423
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
1423
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
1424
1424
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1425
1425
|
definitionMap.set('type', meta.type.value);
|
|
1426
1426
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1455,7 +1455,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1455
1455
|
function createInjectableDefinitionMap(meta) {
|
|
1456
1456
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1457
1457
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1458
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
1458
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
1459
1459
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1460
1460
|
definitionMap.set('type', meta.type.value);
|
|
1461
1461
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1506,7 +1506,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1506
1506
|
function createInjectorDefinitionMap(meta) {
|
|
1507
1507
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1508
1508
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1509
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
1509
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
1510
1510
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1511
1511
|
definitionMap.set('type', meta.type.value);
|
|
1512
1512
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1539,7 +1539,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1539
1539
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1540
1540
|
}
|
|
1541
1541
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1542
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
1542
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
1543
1543
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1544
1544
|
definitionMap.set('type', meta.type.value);
|
|
1545
1545
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1590,7 +1590,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1590
1590
|
function createPipeDefinitionMap(meta) {
|
|
1591
1591
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1592
1592
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1593
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.2.
|
|
1593
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.2.4'));
|
|
1594
1594
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1595
1595
|
// e.g. `type: MyPipe`
|
|
1596
1596
|
definitionMap.set('type', meta.type.value);
|
|
@@ -12330,7 +12330,7 @@ class PipeDecoratorHandler {
|
|
|
12330
12330
|
* @description
|
|
12331
12331
|
* Entry point for all public APIs of the compiler-cli package.
|
|
12332
12332
|
*/
|
|
12333
|
-
new project_tsconfig_paths.Version('20.2.
|
|
12333
|
+
new project_tsconfig_paths.Version('20.2.4');
|
|
12334
12334
|
|
|
12335
12335
|
/**
|
|
12336
12336
|
* Whether a given decorator should be treated as an Angular decorator.
|
|
@@ -20320,7 +20320,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
20320
20320
|
* @param minVersion Minimum required version for the feature.
|
|
20321
20321
|
*/
|
|
20322
20322
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
20323
|
-
// A version of `20.2.
|
|
20323
|
+
// A version of `20.2.4` usually means that core is at head so it supports
|
|
20324
20324
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
20325
20325
|
// with the current version during build time.
|
|
20326
20326
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
12
|
+
require('./index-DXYtX_OC.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
15
|
+
var project_paths = require('./project_paths-FWT-fVvl.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-C481F-Gt.cjs');
|
|
17
17
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
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-BBQ2scSi.cjs');
|
|
12
12
|
var ts = require('typescript');
|
|
13
13
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
14
14
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
15
15
|
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
16
16
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
17
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
17
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
18
18
|
require('os');
|
|
19
19
|
require('fs');
|
|
20
20
|
require('module');
|
|
@@ -820,67 +820,162 @@ function migrateClass(node, constructor, superCall, options, memberIndentation,
|
|
|
820
820
|
* @param afterSuper Statements to be added after the `super` call.
|
|
821
821
|
*/
|
|
822
822
|
function migrateParameter(node, options, localTypeChecker, printer, tracker, superCall, usedInSuper, usedInConstructor, usesOtherParams, memberIndentation, innerIndentation, prependToConstructor, propsToAdd, afterSuper) {
|
|
823
|
-
|
|
823
|
+
const context = {
|
|
824
|
+
node,
|
|
825
|
+
options,
|
|
826
|
+
localTypeChecker,
|
|
827
|
+
printer,
|
|
828
|
+
tracker,
|
|
829
|
+
superCall,
|
|
830
|
+
usedInSuper,
|
|
831
|
+
usedInConstructor,
|
|
832
|
+
usesOtherParams,
|
|
833
|
+
memberIndentation,
|
|
834
|
+
innerIndentation,
|
|
835
|
+
prependToConstructor,
|
|
836
|
+
propsToAdd,
|
|
837
|
+
afterSuper,
|
|
838
|
+
};
|
|
839
|
+
if (ts.isIdentifier(node.name)) {
|
|
840
|
+
migrateIdentifierParameter(context, node.name);
|
|
841
|
+
}
|
|
842
|
+
else if (ts.isObjectBindingPattern(node.name)) {
|
|
843
|
+
migrateObjectBindingParameter(context, node.name);
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
824
846
|
return;
|
|
825
847
|
}
|
|
826
|
-
|
|
848
|
+
}
|
|
849
|
+
function migrateIdentifierParameter(context, name) {
|
|
850
|
+
const { node, options, localTypeChecker, printer, tracker, usedInConstructor, usesOtherParams } = context;
|
|
827
851
|
const replacementCall = createInjectReplacementCall(node, options, localTypeChecker, printer, tracker);
|
|
828
852
|
const declaresProp = parameterDeclaresProperty(node);
|
|
829
853
|
// If the parameter declares a property, we need to declare it (e.g. `private foo: Foo`).
|
|
830
854
|
if (declaresProp) {
|
|
831
|
-
|
|
832
|
-
// other parameters. See the logic further below for the initialization.
|
|
833
|
-
const canInitialize = !usedInSuper && !usesOtherParams;
|
|
834
|
-
const prop = ts.factory.createPropertyDeclaration(cloneModifiers(node.modifiers?.filter((modifier) => {
|
|
835
|
-
// Strip out the DI decorators, as well as `public` which is redundant.
|
|
836
|
-
return !ts.isDecorator(modifier) && modifier.kind !== ts.SyntaxKind.PublicKeyword;
|
|
837
|
-
})), name,
|
|
838
|
-
// Don't add the question token to private properties since it won't affect interface implementation.
|
|
839
|
-
node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.PrivateKeyword)
|
|
840
|
-
? undefined
|
|
841
|
-
: node.questionToken, canInitialize ? undefined : node.type, canInitialize ? ts.factory.createIdentifier(PLACEHOLDER) : undefined);
|
|
842
|
-
propsToAdd.push(memberIndentation +
|
|
843
|
-
replaceNodePlaceholder(node.getSourceFile(), prop, replacementCall, printer));
|
|
855
|
+
handlePropertyDeclaration(context, name, replacementCall);
|
|
844
856
|
}
|
|
845
857
|
// If the parameter is referenced within the constructor, we need to declare it as a variable.
|
|
846
858
|
if (usedInConstructor) {
|
|
847
|
-
|
|
848
|
-
// Usages of `this` aren't allowed before `super` calls so we need to
|
|
849
|
-
// create a variable which calls `inject()` directly instead...
|
|
850
|
-
prependToConstructor.push(`${innerIndentation}const ${name} = ${replacementCall};`);
|
|
851
|
-
// ...then we can initialize the property after the `super` call.
|
|
852
|
-
if (declaresProp) {
|
|
853
|
-
afterSuper.push(`${innerIndentation}this.${name} = ${name};`);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
else if (declaresProp) {
|
|
857
|
-
// If the parameter declares a property (`private foo: foo`) and is used inside the class
|
|
858
|
-
// at the same time, we need to ensure that it's initialized to the value from the variable
|
|
859
|
-
// and that we only reference `this` after the `super` call.
|
|
860
|
-
const initializer = `${innerIndentation}const ${name} = this.${name};`;
|
|
861
|
-
if (superCall === null) {
|
|
862
|
-
prependToConstructor.push(initializer);
|
|
863
|
-
}
|
|
864
|
-
else {
|
|
865
|
-
afterSuper.push(initializer);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
else {
|
|
869
|
-
// If the parameter is only referenced in the constructor, we
|
|
870
|
-
// don't need to declare any new properties.
|
|
871
|
-
prependToConstructor.push(`${innerIndentation}const ${name} = ${replacementCall};`);
|
|
872
|
-
}
|
|
859
|
+
handleConstructorUsage(context, name.text, replacementCall, declaresProp);
|
|
873
860
|
}
|
|
874
861
|
else if (usesOtherParams && declaresProp) {
|
|
875
|
-
|
|
862
|
+
handleParameterWithDependencies(context, name.text, replacementCall);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function handlePropertyDeclaration(context, name, replacementCall) {
|
|
866
|
+
const { node, memberIndentation, propsToAdd } = context;
|
|
867
|
+
const canInitialize = !context.usedInSuper && !context.usesOtherParams;
|
|
868
|
+
const prop = ts.factory.createPropertyDeclaration(cloneModifiers(node.modifiers?.filter((modifier) => {
|
|
869
|
+
return !ts.isDecorator(modifier) && modifier.kind !== ts.SyntaxKind.PublicKeyword;
|
|
870
|
+
})), name, node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.PrivateKeyword)
|
|
871
|
+
? undefined
|
|
872
|
+
: node.questionToken, canInitialize ? undefined : node.type, canInitialize ? ts.factory.createIdentifier(PLACEHOLDER) : undefined);
|
|
873
|
+
propsToAdd.push(memberIndentation +
|
|
874
|
+
replaceNodePlaceholder(node.getSourceFile(), prop, replacementCall, context.printer));
|
|
875
|
+
}
|
|
876
|
+
function handleConstructorUsage(context, name, replacementCall, declaresProp) {
|
|
877
|
+
const { innerIndentation, prependToConstructor, afterSuper, superCall } = context;
|
|
878
|
+
if (context.usedInSuper) {
|
|
879
|
+
// Usages of `this` aren't allowed before `super` calls so we need to
|
|
880
|
+
// create a variable which calls `inject()` directly instead...
|
|
881
|
+
prependToConstructor.push(`${innerIndentation}const ${name} = ${replacementCall};`);
|
|
882
|
+
if (declaresProp) {
|
|
883
|
+
afterSuper.push(`${innerIndentation}this.${name} = ${name};`);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
else if (declaresProp) {
|
|
887
|
+
// If the parameter declares a property (`private foo: foo`) and is used inside the class
|
|
888
|
+
// at the same time, we need to ensure that it's initialized to the value from the variable
|
|
889
|
+
// and that we only reference `this` after the `super` call.
|
|
890
|
+
const initializer = `${innerIndentation}const ${name} = this.${name};`;
|
|
876
891
|
if (superCall === null) {
|
|
877
|
-
prependToConstructor.push(
|
|
892
|
+
prependToConstructor.push(initializer);
|
|
878
893
|
}
|
|
879
894
|
else {
|
|
880
|
-
afterSuper.push(
|
|
895
|
+
afterSuper.push(initializer);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
// If the parameter is only referenced in the constructor, we
|
|
900
|
+
// don't need to declare any new properties.
|
|
901
|
+
prependToConstructor.push(`${innerIndentation}const ${name} = ${replacementCall};`);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
function handleParameterWithDependencies(context, name, replacementCall) {
|
|
905
|
+
const { innerIndentation, prependToConstructor, afterSuper, superCall } = context;
|
|
906
|
+
const toAdd = `${innerIndentation}this.${name} = ${replacementCall};`;
|
|
907
|
+
if (superCall === null) {
|
|
908
|
+
prependToConstructor.push(toAdd);
|
|
909
|
+
}
|
|
910
|
+
else {
|
|
911
|
+
afterSuper.push(toAdd);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
function migrateObjectBindingParameter(context, bindingPattern) {
|
|
915
|
+
const { node, options, localTypeChecker, printer, tracker } = context;
|
|
916
|
+
const replacementCall = createInjectReplacementCall(node, options, localTypeChecker, printer, tracker);
|
|
917
|
+
for (const element of bindingPattern.elements) {
|
|
918
|
+
if (ts.isBindingElement(element) && ts.isIdentifier(element.name)) {
|
|
919
|
+
migrateBindingElement(context, element, element.name, replacementCall);
|
|
881
920
|
}
|
|
882
921
|
}
|
|
883
922
|
}
|
|
923
|
+
function migrateBindingElement(context, element, elementName, replacementCall) {
|
|
924
|
+
const propertyName = elementName.text;
|
|
925
|
+
// Determines how to access the property
|
|
926
|
+
const propertyAccess = element.propertyName
|
|
927
|
+
? `${replacementCall}.${element.propertyName.getText()}`
|
|
928
|
+
: `${replacementCall}.${propertyName}`;
|
|
929
|
+
createPropertyForBindingElement(context, propertyName, propertyAccess);
|
|
930
|
+
if (context.usedInConstructor) {
|
|
931
|
+
handleConstructorUsageBindingElement(context, element, propertyName);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
function handleConstructorUsageBindingElement(context, element, propertyName) {
|
|
935
|
+
const { tracker, localTypeChecker, node: paramNode } = context;
|
|
936
|
+
const constructorDecl = paramNode.parent;
|
|
937
|
+
// Check in constructor or exist body content
|
|
938
|
+
if (!ts.isConstructorDeclaration(constructorDecl) || !constructorDecl.body) {
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
// Get the unique "symbol" for our unstructured property.
|
|
942
|
+
const symbol = localTypeChecker.getSymbolAtLocation(element.name);
|
|
943
|
+
if (!symbol) {
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
// Visit recursive function navigate constructor
|
|
947
|
+
const visit = (node) => {
|
|
948
|
+
// Check if current node is identifier (variable)
|
|
949
|
+
if (ts.isIdentifier(node)) {
|
|
950
|
+
// Using the type checker, verify that this identifier refers
|
|
951
|
+
// exactly to our destructured parameter and is not the node of the original declaration.
|
|
952
|
+
if (localTypeChecker.getSymbolAtLocation(node) === symbol && node !== element.name) {
|
|
953
|
+
// If the identifier is used as a shorthand property in an object literal (e.g., { myVar }),
|
|
954
|
+
// must replace the entire `ShorthandPropertyAssignment` node
|
|
955
|
+
// with a `PropertyAssignment` (e.g., myVar: this.myVar).
|
|
956
|
+
if (ts.isShorthandPropertyAssignment(node.parent)) {
|
|
957
|
+
tracker.replaceNode(node.parent, ts.factory.createPropertyAssignment(node, ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propertyName)));
|
|
958
|
+
}
|
|
959
|
+
else {
|
|
960
|
+
// Otherwise, replace the identifier with `this.propertyName`.
|
|
961
|
+
tracker.replaceNode(node, ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propertyName));
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
ts.forEachChild(node, visit);
|
|
966
|
+
};
|
|
967
|
+
visit(constructorDecl.body);
|
|
968
|
+
}
|
|
969
|
+
function createPropertyForBindingElement(context, propertyName, propertyAccess) {
|
|
970
|
+
const { node, memberIndentation, propsToAdd } = context;
|
|
971
|
+
const prop = ts.factory.createPropertyDeclaration(cloneModifiers(node.modifiers?.filter((modifier) => {
|
|
972
|
+
return !ts.isDecorator(modifier) && modifier.kind !== ts.SyntaxKind.PublicKeyword;
|
|
973
|
+
})), propertyName, node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.PrivateKeyword)
|
|
974
|
+
? undefined
|
|
975
|
+
: node.questionToken, undefined, ts.factory.createIdentifier(PLACEHOLDER));
|
|
976
|
+
propsToAdd.push(memberIndentation +
|
|
977
|
+
replaceNodePlaceholder(node.getSourceFile(), prop, propertyAccess, context.printer));
|
|
978
|
+
}
|
|
884
979
|
/**
|
|
885
980
|
* Creates a replacement `inject` call from a function parameter.
|
|
886
981
|
* @param param Parameter for which to generate the `inject` call.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.2.
|
|
3
|
+
* @license Angular v20.2.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-Cj3oe5Ih.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
12
|
var assert = require('assert');
|
|
13
|
-
var index = require('./index-
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
13
|
+
var index = require('./index-Cwnr5FLK.cjs');
|
|
14
|
+
var project_paths = require('./project_paths-FWT-fVvl.cjs');
|
|
15
15
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
16
|
-
require('./index-
|
|
16
|
+
require('./index-DXYtX_OC.cjs');
|
|
17
17
|
require('path');
|
|
18
18
|
require('node:path');
|
|
19
19
|
var assert$1 = require('node:assert');
|