@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/fesm2015/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
|
*/
|
|
@@ -8695,7 +8695,7 @@ class Version {
|
|
|
8695
8695
|
/**
|
|
8696
8696
|
* @publicApi
|
|
8697
8697
|
*/
|
|
8698
|
-
const VERSION = new Version('15.2.
|
|
8698
|
+
const VERSION = new Version('15.2.5');
|
|
8699
8699
|
|
|
8700
8700
|
// This default value is when checking the hierarchy for a token.
|
|
8701
8701
|
//
|
|
@@ -8929,12 +8929,19 @@ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
|
|
|
8929
8929
|
ngDevMode &&
|
|
8930
8930
|
assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');
|
|
8931
8931
|
let i = 0;
|
|
8932
|
+
// Indicates whether we are processing value from the implicit
|
|
8933
|
+
// attribute section (i.e. before the first marker in the array).
|
|
8934
|
+
let isImplicitAttrsSection = true;
|
|
8932
8935
|
while (i < attrs.length) {
|
|
8933
8936
|
let item = attrs[i++];
|
|
8934
|
-
if (
|
|
8935
|
-
|
|
8936
|
-
if (
|
|
8937
|
-
|
|
8937
|
+
if (typeof item === 'string' && isImplicitAttrsSection) {
|
|
8938
|
+
const value = attrs[i++];
|
|
8939
|
+
if (isProjectionMode && item === 'class') {
|
|
8940
|
+
// We found a `class` attribute in the implicit attribute section,
|
|
8941
|
+
// check if it matches the value of the `cssClassToMatch` argument.
|
|
8942
|
+
if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) {
|
|
8943
|
+
return true;
|
|
8944
|
+
}
|
|
8938
8945
|
}
|
|
8939
8946
|
}
|
|
8940
8947
|
else if (item === 1 /* AttributeMarker.Classes */) {
|
|
@@ -8946,6 +8953,11 @@ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
|
|
|
8946
8953
|
}
|
|
8947
8954
|
return false;
|
|
8948
8955
|
}
|
|
8956
|
+
else if (typeof item === 'number') {
|
|
8957
|
+
// We've came across a first marker, which indicates
|
|
8958
|
+
// that the implicit attribute section is over.
|
|
8959
|
+
isImplicitAttrsSection = false;
|
|
8960
|
+
}
|
|
8949
8961
|
}
|
|
8950
8962
|
return false;
|
|
8951
8963
|
}
|
|
@@ -16364,8 +16376,11 @@ function isStylingValuePresent(value) {
|
|
|
16364
16376
|
* @param suffix
|
|
16365
16377
|
*/
|
|
16366
16378
|
function normalizeSuffix(value, suffix) {
|
|
16367
|
-
if (value == null
|
|
16379
|
+
if (value == null || value === '') {
|
|
16368
16380
|
// do nothing
|
|
16381
|
+
// Do not add the suffix if the value is going to be empty.
|
|
16382
|
+
// As it produce invalid CSS, which the browsers will automatically omit but Domino will not.
|
|
16383
|
+
// Example: `"left": "px;"` instead of `"left": ""`.
|
|
16369
16384
|
}
|
|
16370
16385
|
else if (typeof suffix === 'string') {
|
|
16371
16386
|
value = value + suffix;
|
|
@@ -23570,10 +23585,11 @@ class TestBedCompiler {
|
|
|
23570
23585
|
}
|
|
23571
23586
|
}
|
|
23572
23587
|
queueTypesFromModulesArray(arr) {
|
|
23573
|
-
// Because we may encounter the same NgModule
|
|
23574
|
-
// NgModule
|
|
23575
|
-
// encountered. In some test setups, this caching
|
|
23576
|
-
|
|
23588
|
+
// Because we may encounter the same NgModule or a standalone Component while processing
|
|
23589
|
+
// the dependencies of an NgModule or a standalone Component, we cache them in this set so we
|
|
23590
|
+
// can skip ones that have already been seen encountered. In some test setups, this caching
|
|
23591
|
+
// resulted in 10X runtime improvement.
|
|
23592
|
+
const processedDefs = new Set();
|
|
23577
23593
|
const queueTypesFromModulesArrayRecur = (arr) => {
|
|
23578
23594
|
var _a;
|
|
23579
23595
|
for (const value of arr) {
|
|
@@ -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((_a = def.dependencies) !== null && _a !== void 0 ? _a : []);
|
|
23602
23622
|
dependencies.forEach((dependency) => {
|
|
23603
23623
|
// Note: in AOT, the `dependencies` might also contain regular
|