@angular/core 15.2.3 → 15.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/esm2020/src/change_detection/change_detector_ref.mjs +4 -4
- package/esm2020/src/render3/node_selector_matcher.mjs +17 -5
- package/esm2020/src/render3/view_ref.mjs +1 -1
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/test_bed_compiler.mjs +12 -7
- package/fesm2015/core.mjs +18 -6
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +29 -12
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +18 -6
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +29 -12
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/package.json +1 -1
- package/schematics/migrations/relative-link-resolution/bundle.js +7 -7
- package/schematics/migrations/router-link-with-href/bundle.js +10 -10
- package/schematics/ng-generate/standalone-migration/bundle.js +323 -323
- package/schematics/ng-generate/standalone-migration/bundle.js.map +1 -1
- package/testing/index.d.ts +1 -1
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8705,7 +8705,7 @@ class Version {
|
|
|
8705
8705
|
/**
|
|
8706
8706
|
* @publicApi
|
|
8707
8707
|
*/
|
|
8708
|
-
const VERSION = new Version('15.2.
|
|
8708
|
+
const VERSION = new Version('15.2.4');
|
|
8709
8709
|
|
|
8710
8710
|
// This default value is when checking the hierarchy for a token.
|
|
8711
8711
|
//
|
|
@@ -8939,12 +8939,19 @@ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
|
|
|
8939
8939
|
ngDevMode &&
|
|
8940
8940
|
assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');
|
|
8941
8941
|
let i = 0;
|
|
8942
|
+
// Indicates whether we are processing value from the implicit
|
|
8943
|
+
// attribute section (i.e. before the first marker in the array).
|
|
8944
|
+
let isImplicitAttrsSection = true;
|
|
8942
8945
|
while (i < attrs.length) {
|
|
8943
8946
|
let item = attrs[i++];
|
|
8944
|
-
if (
|
|
8945
|
-
|
|
8946
|
-
if (
|
|
8947
|
-
|
|
8947
|
+
if (typeof item === 'string' && isImplicitAttrsSection) {
|
|
8948
|
+
const value = attrs[i++];
|
|
8949
|
+
if (isProjectionMode && item === 'class') {
|
|
8950
|
+
// We found a `class` attribute in the implicit attribute section,
|
|
8951
|
+
// check if it matches the value of the `cssClassToMatch` argument.
|
|
8952
|
+
if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) {
|
|
8953
|
+
return true;
|
|
8954
|
+
}
|
|
8948
8955
|
}
|
|
8949
8956
|
}
|
|
8950
8957
|
else if (item === 1 /* AttributeMarker.Classes */) {
|
|
@@ -8956,6 +8963,11 @@ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
|
|
|
8956
8963
|
}
|
|
8957
8964
|
return false;
|
|
8958
8965
|
}
|
|
8966
|
+
else if (typeof item === 'number') {
|
|
8967
|
+
// We've came across a first marker, which indicates
|
|
8968
|
+
// that the implicit attribute section is over.
|
|
8969
|
+
isImplicitAttrsSection = false;
|
|
8970
|
+
}
|
|
8959
8971
|
}
|
|
8960
8972
|
return false;
|
|
8961
8973
|
}
|
|
@@ -23571,10 +23583,11 @@ class TestBedCompiler {
|
|
|
23571
23583
|
}
|
|
23572
23584
|
}
|
|
23573
23585
|
queueTypesFromModulesArray(arr) {
|
|
23574
|
-
// Because we may encounter the same NgModule
|
|
23575
|
-
// NgModule
|
|
23576
|
-
// encountered. In some test setups, this caching
|
|
23577
|
-
|
|
23586
|
+
// Because we may encounter the same NgModule or a standalone Component while processing
|
|
23587
|
+
// the dependencies of an NgModule or a standalone Component, we cache them in this set so we
|
|
23588
|
+
// can skip ones that have already been seen encountered. In some test setups, this caching
|
|
23589
|
+
// resulted in 10X runtime improvement.
|
|
23590
|
+
const processedDefs = new Set();
|
|
23578
23591
|
const queueTypesFromModulesArrayRecur = (arr) => {
|
|
23579
23592
|
for (const value of arr) {
|
|
23580
23593
|
if (Array.isArray(value)) {
|
|
@@ -23582,10 +23595,10 @@ class TestBedCompiler {
|
|
|
23582
23595
|
}
|
|
23583
23596
|
else if (hasNgModuleDef(value)) {
|
|
23584
23597
|
const def = value.ɵmod;
|
|
23585
|
-
if (
|
|
23598
|
+
if (processedDefs.has(def)) {
|
|
23586
23599
|
continue;
|
|
23587
23600
|
}
|
|
23588
|
-
|
|
23601
|
+
processedDefs.add(def);
|
|
23589
23602
|
// Look through declarations, imports, and exports, and queue
|
|
23590
23603
|
// everything found there.
|
|
23591
23604
|
this.queueTypeArray(maybeUnwrapFn(def.declarations), value);
|
|
@@ -23598,6 +23611,10 @@ class TestBedCompiler {
|
|
|
23598
23611
|
else if (isStandaloneComponent(value)) {
|
|
23599
23612
|
this.queueType(value, null);
|
|
23600
23613
|
const def = getComponentDef(value);
|
|
23614
|
+
if (processedDefs.has(def)) {
|
|
23615
|
+
continue;
|
|
23616
|
+
}
|
|
23617
|
+
processedDefs.add(def);
|
|
23601
23618
|
const dependencies = maybeUnwrapFn(def.dependencies ?? []);
|
|
23602
23619
|
dependencies.forEach((dependency) => {
|
|
23603
23620
|
// Note: in AOT, the `dependencies` might also contain regular
|