@angular/core 20.3.3 → 20.3.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 +2 -2
- package/chrome_dev_tools_performance.d.d.ts +2 -2
- package/discovery.d.d.ts +11 -4
- package/effect.d.d.ts +2 -2
- package/event_dispatcher.d.d.ts +2 -2
- package/fesm2022/attribute.mjs +2 -2
- package/fesm2022/core.mjs +2 -2
- package/fesm2022/debug_node.mjs +193 -87
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +2 -2
- package/fesm2022/not_found.mjs +2 -2
- package/fesm2022/primitives/di.mjs +2 -2
- package/fesm2022/primitives/event-dispatch.mjs +2 -2
- package/fesm2022/primitives/signals.mjs +2 -2
- package/fesm2022/resource.mjs +2 -2
- package/fesm2022/root_effect_scheduler.mjs +3 -3
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/signal.mjs +2 -2
- package/fesm2022/testing.mjs +2 -2
- package/fesm2022/weak_ref.mjs +2 -2
- package/formatter.d.d.ts +2 -2
- package/index.d.ts +2 -2
- package/package.json +2 -2
- package/primitives/di/index.d.ts +2 -2
- package/primitives/event-dispatch/index.d.ts +2 -2
- package/primitives/signals/index.d.ts +2 -2
- package/rxjs-interop/index.d.ts +2 -2
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
- package/schematics/bundles/apply_import_manager-CUBvPp_2.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/compiler_host-DJHZ7M9N.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/document-core.cjs +1 -1
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/index-BZJ8bv9v.cjs +11 -11
- package/schematics/bundles/index-DU_evmAi.cjs +1 -1
- package/schematics/bundles/inject-flags.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-58gA72Ti.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/project_paths-DcM18127.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-Dqd0J7st.cjs +2 -2
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-current-navigation.cjs +1 -1
- 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 +47 -7
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +1 -1
- package/testing/index.d.ts +2 -2
- package/weak_ref.d.d.ts +2 -2
package/fesm2022/signal.mjs
CHANGED
package/fesm2022/testing.mjs
CHANGED
package/fesm2022/weak_ref.mjs
CHANGED
package/formatter.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.3.
|
|
3
|
+
"version": "20.3.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.3.
|
|
49
|
+
"@angular/compiler": "20.3.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -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.3.
|
|
894
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
912
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
1007
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
1423
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
1458
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
1509
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
1542
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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.3.
|
|
1593
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.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);
|
|
@@ -12333,7 +12333,7 @@ class PipeDecoratorHandler {
|
|
|
12333
12333
|
* @description
|
|
12334
12334
|
* Entry point for all public APIs of the compiler-cli package.
|
|
12335
12335
|
*/
|
|
12336
|
-
new project_tsconfig_paths.Version('20.3.
|
|
12336
|
+
new project_tsconfig_paths.Version('20.3.4');
|
|
12337
12337
|
|
|
12338
12338
|
/**
|
|
12339
12339
|
* Whether a given decorator should be treated as an Angular decorator.
|
|
@@ -20437,7 +20437,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
20437
20437
|
* @param minVersion Minimum required version for the feature.
|
|
20438
20438
|
*/
|
|
20439
20439
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
20440
|
-
// A version of `20.3.
|
|
20440
|
+
// A version of `20.3.4` usually means that core is at head so it supports
|
|
20441
20441
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
20442
20442
|
// with the current version during build time.
|
|
20443
20443
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -32768,7 +32768,7 @@ function isAttrNode(ast) {
|
|
|
32768
32768
|
* @description
|
|
32769
32769
|
* Entry point for all public APIs of the compiler package.
|
|
32770
32770
|
*/
|
|
32771
|
-
const VERSION = new Version('20.3.
|
|
32771
|
+
const VERSION = new Version('20.3.4');
|
|
32772
32772
|
|
|
32773
32773
|
//////////////////////////////////////
|
|
32774
32774
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.4
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -971,7 +971,7 @@ function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, pri
|
|
|
971
971
|
}
|
|
972
972
|
node.forEachChild(walk);
|
|
973
973
|
});
|
|
974
|
-
replaceInComponentImportsArray(componentImportArrays, classesToRemove, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
974
|
+
replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
975
975
|
replaceInTestImportsArray(testArrays, removalLocations, classesToRemove, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
976
976
|
// We collect all the places where we need to remove references first before generating the
|
|
977
977
|
// removal instructions since we may have to remove multiple references from one node.
|
|
@@ -1077,12 +1077,13 @@ function collectChangeLocations(ngModule, removalLocations, componentImportArray
|
|
|
1077
1077
|
* Replaces all the leftover modules in component `imports` arrays with their exports.
|
|
1078
1078
|
* @param componentImportArrays All the imports arrays and their nodes that represent NgModules.
|
|
1079
1079
|
* @param classesToRemove Set of classes that were marked for removal.
|
|
1080
|
+
* @param removalLocations Tracks the different places from which imports should be removed.
|
|
1080
1081
|
* @param tracker
|
|
1081
1082
|
* @param typeChecker
|
|
1082
1083
|
* @param templateTypeChecker
|
|
1083
1084
|
* @param importRemapper
|
|
1084
1085
|
*/
|
|
1085
|
-
function replaceInComponentImportsArray(componentImportArrays, classesToRemove, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1086
|
+
function replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1086
1087
|
for (const [array, toReplace] of componentImportArrays.getEntries()) {
|
|
1087
1088
|
const closestClass = nodes.closestNode(array, ts.isClassDeclaration);
|
|
1088
1089
|
if (!closestClass) {
|
|
@@ -1090,16 +1091,35 @@ function replaceInComponentImportsArray(componentImportArrays, classesToRemove,
|
|
|
1090
1091
|
}
|
|
1091
1092
|
const replacements = new UniqueItemTracker();
|
|
1092
1093
|
const usedImports = new Set(findTemplateDependencies(closestClass, templateTypeChecker).map((ref) => ref.node));
|
|
1094
|
+
const nodesToRemove = new Set();
|
|
1093
1095
|
for (const node of toReplace) {
|
|
1094
1096
|
const moduleDecl = findClassDeclaration(node, typeChecker);
|
|
1095
1097
|
if (moduleDecl) {
|
|
1096
1098
|
const moduleMeta = templateTypeChecker.getNgModuleMetadata(moduleDecl);
|
|
1097
1099
|
if (moduleMeta) {
|
|
1100
|
+
let hasUsedExports = false;
|
|
1098
1101
|
moduleMeta.exports.forEach((exp) => {
|
|
1099
1102
|
if (usedImports.has(exp.node)) {
|
|
1100
1103
|
replacements.track(node, exp);
|
|
1104
|
+
hasUsedExports = true;
|
|
1101
1105
|
}
|
|
1102
1106
|
});
|
|
1107
|
+
// If none of the module's exports are used, track the node for removal
|
|
1108
|
+
if (!hasUsedExports) {
|
|
1109
|
+
nodesToRemove.add(node);
|
|
1110
|
+
}
|
|
1111
|
+
else if (ts.isIdentifier(node)) {
|
|
1112
|
+
// Track the import statement for removal when replacing with exports
|
|
1113
|
+
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
1114
|
+
const declarations = symbol?.declarations;
|
|
1115
|
+
if (declarations) {
|
|
1116
|
+
for (const declaration of declarations) {
|
|
1117
|
+
if (ts.isImportSpecifier(declaration)) {
|
|
1118
|
+
removalLocations.imports.track(declaration.parent, declaration);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1103
1123
|
}
|
|
1104
1124
|
else {
|
|
1105
1125
|
// It's unlikely not to have module metadata at this point, but just in
|
|
@@ -1108,12 +1128,13 @@ function replaceInComponentImportsArray(componentImportArrays, classesToRemove,
|
|
|
1108
1128
|
}
|
|
1109
1129
|
}
|
|
1110
1130
|
}
|
|
1111
|
-
replaceModulesInImportsArray(array, replacements, tracker, templateTypeChecker, importRemapper);
|
|
1131
|
+
replaceModulesInImportsArray(array, replacements, nodesToRemove, tracker, templateTypeChecker, importRemapper);
|
|
1112
1132
|
}
|
|
1113
1133
|
}
|
|
1114
1134
|
/**
|
|
1115
1135
|
* Replaces all the leftover modules in testing `imports` arrays with their exports.
|
|
1116
1136
|
* @param testImportArrays All test `imports` arrays and their nodes that represent modules.
|
|
1137
|
+
* @param removalLocations Tracks the different places from which imports should be removed.
|
|
1117
1138
|
* @param classesToRemove Classes marked for removal by the migration.
|
|
1118
1139
|
* @param tracker
|
|
1119
1140
|
* @param typeChecker
|
|
@@ -1123,6 +1144,7 @@ function replaceInComponentImportsArray(componentImportArrays, classesToRemove,
|
|
|
1123
1144
|
function replaceInTestImportsArray(testImportArrays, removalLocations, classesToRemove, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1124
1145
|
for (const [array, toReplace] of testImportArrays.getEntries()) {
|
|
1125
1146
|
const replacements = new UniqueItemTracker();
|
|
1147
|
+
const nodesToRemove = new Set();
|
|
1126
1148
|
for (const node of toReplace) {
|
|
1127
1149
|
const moduleDecl = findClassDeclaration(node, typeChecker);
|
|
1128
1150
|
if (moduleDecl) {
|
|
@@ -1133,6 +1155,18 @@ function replaceInTestImportsArray(testImportArrays, removalLocations, classesTo
|
|
|
1133
1155
|
const exports = moduleMeta.exports.filter((exp) => !classesToRemove.has(exp.node));
|
|
1134
1156
|
if (exports.length > 0) {
|
|
1135
1157
|
exports.forEach((exp) => replacements.track(node, exp));
|
|
1158
|
+
// Track the import statement for removal when replacing with exports
|
|
1159
|
+
if (ts.isIdentifier(node)) {
|
|
1160
|
+
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
1161
|
+
const declarations = symbol?.declarations;
|
|
1162
|
+
if (declarations) {
|
|
1163
|
+
for (const declaration of declarations) {
|
|
1164
|
+
if (ts.isImportSpecifier(declaration)) {
|
|
1165
|
+
removalLocations.imports.track(declaration.parent, declaration);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1136
1170
|
}
|
|
1137
1171
|
else {
|
|
1138
1172
|
removalLocations.arrays.track(array, node);
|
|
@@ -1145,19 +1179,21 @@ function replaceInTestImportsArray(testImportArrays, removalLocations, classesTo
|
|
|
1145
1179
|
}
|
|
1146
1180
|
}
|
|
1147
1181
|
}
|
|
1148
|
-
replaceModulesInImportsArray(array, replacements, tracker, templateTypeChecker, importRemapper);
|
|
1182
|
+
replaceModulesInImportsArray(array, replacements, nodesToRemove, tracker, templateTypeChecker, importRemapper);
|
|
1149
1183
|
}
|
|
1150
1184
|
}
|
|
1151
1185
|
/**
|
|
1152
1186
|
* Replaces any leftover modules in an `imports` arrays with a set of specified exports
|
|
1153
1187
|
* @param array Imports array which is being migrated.
|
|
1154
1188
|
* @param replacements Map of NgModule references to their exports.
|
|
1189
|
+
* @param nodesToRemove Set of nodes that should be removed without replacement (unused modules).
|
|
1155
1190
|
* @param tracker
|
|
1191
|
+
* @param typeChecker
|
|
1156
1192
|
* @param templateTypeChecker
|
|
1157
1193
|
* @param importRemapper
|
|
1158
1194
|
*/
|
|
1159
|
-
function replaceModulesInImportsArray(array, replacements, tracker, templateTypeChecker, importRemapper) {
|
|
1160
|
-
if (replacements.isEmpty()) {
|
|
1195
|
+
function replaceModulesInImportsArray(array, replacements, nodesToRemove, tracker, templateTypeChecker, importRemapper) {
|
|
1196
|
+
if (replacements.isEmpty() && nodesToRemove.size === 0) {
|
|
1161
1197
|
return;
|
|
1162
1198
|
}
|
|
1163
1199
|
const newElements = [];
|
|
@@ -1168,6 +1204,10 @@ function replaceModulesInImportsArray(array, replacements, tracker, templateType
|
|
|
1168
1204
|
}
|
|
1169
1205
|
}
|
|
1170
1206
|
for (const element of array.elements) {
|
|
1207
|
+
// Check if this element should be removed entirely (unused module)
|
|
1208
|
+
if (nodesToRemove.has(element)) {
|
|
1209
|
+
continue;
|
|
1210
|
+
}
|
|
1171
1211
|
const replacementRefs = replacements.get(element);
|
|
1172
1212
|
if (!replacementRefs) {
|
|
1173
1213
|
newElements.push(element);
|
package/testing/index.d.ts
CHANGED
package/weak_ref.d.d.ts
CHANGED