@rankcli/agent-runtime 0.0.35 → 0.0.36
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/dist/index.js +8 -10
- package/dist/index.mjs +8 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11429,17 +11429,14 @@ var DOM_SIZE_ERROR = 3e3;
|
|
|
11429
11429
|
var DOM_DEPTH_WARNING = 32;
|
|
11430
11430
|
function countNodes($) {
|
|
11431
11431
|
let count = 0;
|
|
11432
|
-
function traverse(
|
|
11433
|
-
|
|
11434
|
-
|
|
11432
|
+
function traverse(node) {
|
|
11433
|
+
const el = node;
|
|
11434
|
+
if (el.type === "tag") count++;
|
|
11435
11435
|
if (el.children) {
|
|
11436
|
-
for (const child of el.children)
|
|
11437
|
-
traverse(child);
|
|
11438
|
-
}
|
|
11436
|
+
for (const child of el.children) traverse(child);
|
|
11439
11437
|
}
|
|
11440
11438
|
}
|
|
11441
|
-
|
|
11442
|
-
root.each((_, el) => traverse(el));
|
|
11439
|
+
$.root().each((_, el) => traverse(el));
|
|
11443
11440
|
return count;
|
|
11444
11441
|
}
|
|
11445
11442
|
function calculateMaxDepth($) {
|
|
@@ -14325,7 +14322,7 @@ function analyzeResponsiveImages(html, url) {
|
|
|
14325
14322
|
if (imagesWithoutDimensions >= 3) {
|
|
14326
14323
|
issues.push({
|
|
14327
14324
|
code: "IMAGES_MISSING_DIMENSIONS",
|
|
14328
|
-
severity: "
|
|
14325
|
+
severity: "warning",
|
|
14329
14326
|
category: "performance",
|
|
14330
14327
|
title: `${imagesWithoutDimensions} images missing width/height attributes`,
|
|
14331
14328
|
description: `Found ${imagesWithoutDimensions} images without explicit dimensions.`,
|
|
@@ -14340,7 +14337,8 @@ function analyzeResponsiveImages(html, url) {
|
|
|
14340
14337
|
} else if (imagesWithoutDimensions > 0) {
|
|
14341
14338
|
issues.push({
|
|
14342
14339
|
code: "IMAGES_MISSING_DIMENSIONS",
|
|
14343
|
-
|
|
14340
|
+
// One or two keeps a gradient below the >=3 case rather than flattening both to warning.
|
|
14341
|
+
severity: "notice",
|
|
14344
14342
|
category: "performance",
|
|
14345
14343
|
title: `${imagesWithoutDimensions} image(s) missing width/height attributes`,
|
|
14346
14344
|
description: `Found ${imagesWithoutDimensions} images without explicit dimensions.`,
|
package/dist/index.mjs
CHANGED
|
@@ -7886,17 +7886,14 @@ var DOM_SIZE_ERROR = 3e3;
|
|
|
7886
7886
|
var DOM_DEPTH_WARNING = 32;
|
|
7887
7887
|
function countNodes($) {
|
|
7888
7888
|
let count = 0;
|
|
7889
|
-
function traverse(
|
|
7890
|
-
|
|
7891
|
-
|
|
7889
|
+
function traverse(node) {
|
|
7890
|
+
const el = node;
|
|
7891
|
+
if (el.type === "tag") count++;
|
|
7892
7892
|
if (el.children) {
|
|
7893
|
-
for (const child of el.children)
|
|
7894
|
-
traverse(child);
|
|
7895
|
-
}
|
|
7893
|
+
for (const child of el.children) traverse(child);
|
|
7896
7894
|
}
|
|
7897
7895
|
}
|
|
7898
|
-
|
|
7899
|
-
root.each((_, el) => traverse(el));
|
|
7896
|
+
$.root().each((_, el) => traverse(el));
|
|
7900
7897
|
return count;
|
|
7901
7898
|
}
|
|
7902
7899
|
function calculateMaxDepth($) {
|
|
@@ -10777,7 +10774,7 @@ function analyzeResponsiveImages(html, url) {
|
|
|
10777
10774
|
if (imagesWithoutDimensions >= 3) {
|
|
10778
10775
|
issues.push({
|
|
10779
10776
|
code: "IMAGES_MISSING_DIMENSIONS",
|
|
10780
|
-
severity: "
|
|
10777
|
+
severity: "warning",
|
|
10781
10778
|
category: "performance",
|
|
10782
10779
|
title: `${imagesWithoutDimensions} images missing width/height attributes`,
|
|
10783
10780
|
description: `Found ${imagesWithoutDimensions} images without explicit dimensions.`,
|
|
@@ -10792,7 +10789,8 @@ function analyzeResponsiveImages(html, url) {
|
|
|
10792
10789
|
} else if (imagesWithoutDimensions > 0) {
|
|
10793
10790
|
issues.push({
|
|
10794
10791
|
code: "IMAGES_MISSING_DIMENSIONS",
|
|
10795
|
-
|
|
10792
|
+
// One or two keeps a gradient below the >=3 case rather than flattening both to warning.
|
|
10793
|
+
severity: "notice",
|
|
10796
10794
|
category: "performance",
|
|
10797
10795
|
title: `${imagesWithoutDimensions} image(s) missing width/height attributes`,
|
|
10798
10796
|
description: `Found ${imagesWithoutDimensions} images without explicit dimensions.`,
|