@angular/core 15.2.3 → 15.2.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/esm2020/src/change_detection/change_detector_ref.mjs +4 -4
- package/esm2020/src/render3/instructions/styling.mjs +5 -2
- 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 +22 -7
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +33 -13
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +22 -7
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +33 -13
- 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 +326 -341
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- 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.5
|
|
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.5');
|
|
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
|
}
|
|
@@ -16372,8 +16384,11 @@ function isStylingValuePresent(value) {
|
|
|
16372
16384
|
* @param suffix
|
|
16373
16385
|
*/
|
|
16374
16386
|
function normalizeSuffix(value, suffix) {
|
|
16375
|
-
if (value == null
|
|
16387
|
+
if (value == null || value === '') {
|
|
16376
16388
|
// do nothing
|
|
16389
|
+
// Do not add the suffix if the value is going to be empty.
|
|
16390
|
+
// As it produce invalid CSS, which the browsers will automatically omit but Domino will not.
|
|
16391
|
+
// Example: `"left": "px;"` instead of `"left": ""`.
|
|
16377
16392
|
}
|
|
16378
16393
|
else if (typeof suffix === 'string') {
|
|
16379
16394
|
value = value + suffix;
|
|
@@ -23571,10 +23586,11 @@ class TestBedCompiler {
|
|
|
23571
23586
|
}
|
|
23572
23587
|
}
|
|
23573
23588
|
queueTypesFromModulesArray(arr) {
|
|
23574
|
-
// Because we may encounter the same NgModule
|
|
23575
|
-
// NgModule
|
|
23576
|
-
// encountered. In some test setups, this caching
|
|
23577
|
-
|
|
23589
|
+
// Because we may encounter the same NgModule or a standalone Component while processing
|
|
23590
|
+
// the dependencies of an NgModule or a standalone Component, we cache them in this set so we
|
|
23591
|
+
// can skip ones that have already been seen encountered. In some test setups, this caching
|
|
23592
|
+
// resulted in 10X runtime improvement.
|
|
23593
|
+
const processedDefs = new Set();
|
|
23578
23594
|
const queueTypesFromModulesArrayRecur = (arr) => {
|
|
23579
23595
|
for (const value of arr) {
|
|
23580
23596
|
if (Array.isArray(value)) {
|
|
@@ -23582,10 +23598,10 @@ class TestBedCompiler {
|
|
|
23582
23598
|
}
|
|
23583
23599
|
else if (hasNgModuleDef(value)) {
|
|
23584
23600
|
const def = value.ɵmod;
|
|
23585
|
-
if (
|
|
23601
|
+
if (processedDefs.has(def)) {
|
|
23586
23602
|
continue;
|
|
23587
23603
|
}
|
|
23588
|
-
|
|
23604
|
+
processedDefs.add(def);
|
|
23589
23605
|
// Look through declarations, imports, and exports, and queue
|
|
23590
23606
|
// everything found there.
|
|
23591
23607
|
this.queueTypeArray(maybeUnwrapFn(def.declarations), value);
|
|
@@ -23598,6 +23614,10 @@ class TestBedCompiler {
|
|
|
23598
23614
|
else if (isStandaloneComponent(value)) {
|
|
23599
23615
|
this.queueType(value, null);
|
|
23600
23616
|
const def = getComponentDef(value);
|
|
23617
|
+
if (processedDefs.has(def)) {
|
|
23618
|
+
continue;
|
|
23619
|
+
}
|
|
23620
|
+
processedDefs.add(def);
|
|
23601
23621
|
const dependencies = maybeUnwrapFn(def.dependencies ?? []);
|
|
23602
23622
|
dependencies.forEach((dependency) => {
|
|
23603
23623
|
// Note: in AOT, the `dependencies` might also contain regular
|