unhead 1.7.0 → 1.7.3
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.cjs +5 -6
- package/dist/index.mjs +5 -6
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -67,11 +67,7 @@ const DedupePlugin = shared.defineHeadPlugin({
|
|
|
67
67
|
newTags.push(...dupes);
|
|
68
68
|
});
|
|
69
69
|
ctx.tags = newTags;
|
|
70
|
-
ctx.tags = ctx.tags.filter((t) =>
|
|
71
|
-
if (t.tag === "meta" && t.props.name && !t.props.content)
|
|
72
|
-
return false;
|
|
73
|
-
return true;
|
|
74
|
-
});
|
|
70
|
+
ctx.tags = ctx.tags.filter((t) => !(t.tag === "meta" && (t.props.name || t.props.property) && !t.props.content));
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
73
|
});
|
|
@@ -361,7 +357,10 @@ function CapoPlugin(options) {
|
|
|
361
357
|
hooks: {
|
|
362
358
|
"tags:beforeResolve": function({ tags }) {
|
|
363
359
|
for (const tag of tags) {
|
|
364
|
-
if (tag.
|
|
360
|
+
if (tag.tagPosition && tag.tagPosition !== "head")
|
|
361
|
+
continue;
|
|
362
|
+
tag.tagPriority = tag.tagPriority || shared.tagWeight(tag);
|
|
363
|
+
if (tag.tagPriority !== 100)
|
|
365
364
|
continue;
|
|
366
365
|
const isTruthy = (val) => val === "" || val === true;
|
|
367
366
|
const isScript = tag.tag === "script";
|
package/dist/index.mjs
CHANGED
|
@@ -66,11 +66,7 @@ const DedupePlugin = defineHeadPlugin({
|
|
|
66
66
|
newTags.push(...dupes);
|
|
67
67
|
});
|
|
68
68
|
ctx.tags = newTags;
|
|
69
|
-
ctx.tags = ctx.tags.filter((t) =>
|
|
70
|
-
if (t.tag === "meta" && t.props.name && !t.props.content)
|
|
71
|
-
return false;
|
|
72
|
-
return true;
|
|
73
|
-
});
|
|
69
|
+
ctx.tags = ctx.tags.filter((t) => !(t.tag === "meta" && (t.props.name || t.props.property) && !t.props.content));
|
|
74
70
|
}
|
|
75
71
|
}
|
|
76
72
|
});
|
|
@@ -360,7 +356,10 @@ function CapoPlugin(options) {
|
|
|
360
356
|
hooks: {
|
|
361
357
|
"tags:beforeResolve": function({ tags }) {
|
|
362
358
|
for (const tag of tags) {
|
|
363
|
-
if (tag.
|
|
359
|
+
if (tag.tagPosition && tag.tagPosition !== "head")
|
|
360
|
+
continue;
|
|
361
|
+
tag.tagPriority = tag.tagPriority || tagWeight(tag);
|
|
362
|
+
if (tag.tagPriority !== 100)
|
|
364
363
|
continue;
|
|
365
364
|
const isTruthy = (val) => val === "" || val === true;
|
|
366
365
|
const isScript = tag.tag === "script";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unhead",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.3",
|
|
5
5
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"hookable": "^5.5.3",
|
|
33
|
-
"@unhead/dom": "1.7.
|
|
34
|
-
"@unhead/schema": "1.7.
|
|
35
|
-
"@unhead/shared": "1.7.
|
|
33
|
+
"@unhead/dom": "1.7.3",
|
|
34
|
+
"@unhead/schema": "1.7.3",
|
|
35
|
+
"@unhead/shared": "1.7.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "unbuild .",
|